Home | History | Annotate | Download | only in Parser
      1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
      2 
      3 // From PR23057 comment #18 (https://llvm.org/bugs/show_bug.cgi?id=23057#c18).
      4 
      5 namespace N {
      6   int X[10]; // expected-note{{declared here}}}}
      7 }
      8 
      9 void f1() {
     10   for (auto operator new : X); // expected-error{{'operator new' cannot be the name of a variable or data member}}
     11                                // expected-error@-1{{use of undeclared identifier 'X'; did you mean 'N::X'?}}
     12 }
     13 
     14 void f2() {
     15   for (a operator== :) // expected-error{{'operator==' cannot be the name of a variable or data member}}
     16                        // expected-error@-1{{expected expression}}
     17                        // expected-error@-2{{unknown type name 'a'}}
     18 } // expected-error{{expected statement}}
     19