1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 enum E {Enumerator}; // expected-note 2{{declared here}}
11 void test(X* xp, X x) {
14 x.E; // expected-error{{cannot refer to type member 'E' in 'X' with '.'}}
15 xp->E; // expected-error{{cannot refer to type member 'E' in 'X' with '->'}}
16 int i3 = x.Enumerator;
17 int i4 = xp->Enumerator;
31 return b->f0->f0; // expected-error{{did you mean to call it with no arguments}}
41 xp->::i = 7; // expected-error{{qualified member access refers to a member in the global namespace}}
42 xp->C::i = 7; // expected-error{{qualified member access refers to a member in namespace 'C'}}
50 void *getIdentifier() const;
53 struct NamespaceDecl : NamedDecl {
54 bool isAnonymousNamespace() const {
55 return !getIdentifier();
63 template<typename T> void f(T);
78 template <class T> void foo();
82 x.A::foo<int>(); // expected-error {{'int' is not a structure or union}}
86 x.A::foo<int>(); // expected-error {{'test5::A *' is a pointer}}
90 x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer}}
96 struct CleanupScope {};
97 void PopCleanupBlock();
101 a.PopCleanupScope(); // expected-error{{no member named 'PopCleanupScope' in 'PR7508::A'}}
105 namespace rdar8231724 {
107 template<typename T> struct X1;
115 y->N::X1<int>; // expected-error{{'rdar8231724::N::X1' is not a member of class 'rdar8231724::Y'}}
121 S fun(); // expected-note{{possible target for call}}
122 int fun(int i); // expected-note{{possible target for call}}
124 return fun.x; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}}
127 S fun2(); // expected-note{{possible target for call}}
128 S fun2(int i); // expected-note{{possible target for call}}
130 return fun2.x; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}}
133 S fun3(int i=0); // expected-note{{possible target for call}}
134 int fun3(int i, int j); // expected-note{{possible target for call}}
136 return fun3.x; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}}
139 template <typename T> S fun4(); // expected-note{{possible target for call}}
141 return fun4.x; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}}
144 S fun5(int i); // expected-note{{possible target for call}}
145 S fun5(float f); // expected-note{{possible target for call}}
147 return fun5.x; // expected-error{{reference to overloaded function could not be resolved; did you mean to call it?}}