1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
2 | |
3 | // Classes. |
4 | namespace Class { |
5 | namespace NS { |
6 | class C {}; // expected-note {{candidate}} |
7 | } |
8 | using namespace NS; |
9 | class C : C {}; // expected-error {{reference to 'C' is ambiguous}} \ |
10 | expected-note {{candidate}} |
11 | } |
12 | |
13 | // Enumerations. |
14 | enum E { |
15 | EPtrSize = sizeof((E*)0) // ok, E is already declared |
16 | }; |
17 | |
18 | // Alias declarations. clang implements the proposed resolution to N1044. |
19 | namespace Alias { |
20 | namespace NS { |
21 | class C; |
22 | } |
23 | using namespace NS; |
24 | using C = C; // ok, C = B::C |
25 | using C = NS::C; // ok, same type |
26 | } |
27 | |