p3.cpp 603 B

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