| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| namespace N { struct X { }; }; |
| int B; // expected-note {{previous definition is here}} |
| namespace B = N; // expected-error {{redefinition of 'B' as different kind of symbol}} |
| namespace C { } // expected-note {{previous definition is here}} |
| namespace C = N; // expected-error {{redefinition of 'C'}} |
| i; // expected-error {{expected namespace name}} |
| Foo; // expected-error {{expected namespace name}} |
| X; // expected-error {{expected namespace name}} |
| namespace A { namespace B { } } // expected-note {{candidate found by name lookup is 'F::A::B'}} |
| namespace B { } // expected-note {{candidate found by name lookup is 'F::B'}} |
| namespace D = B; // expected-error {{reference to 'B' is ambiguous}} |
| // These all point to A1. |
| namespace B = A1; // expected-note {{previous definition is here}} |
| namespace B = A2; // expected-error {{redefinition of 'B' as different kind of symbol}} |
| namespace B { void func (); } |
| namespace KA { void func(); } |
| template <class T> void g() { |
| KB::func(); // expected-error {{undeclared identifier 'KB'}} |
| KC::func(); // expected-error {{undeclared identifier 'KC'}} |