diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-04-15 14:24:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-04-15 14:24:37 +0000 |
commit | dda56e4b4a9c274c5c4011981bd291523e75d747 (patch) | |
tree | cf196c641b7ddeaba8528f2509fc2242ebc7420f /clang/test/CXX/basic/basic.scope | |
parent | 030f499d2f9b2f17c22aad372cdf391e7db22a4f (diff) | |
download | bcm5719-llvm-dda56e4b4a9c274c5c4011981bd291523e75d747.tar.gz bcm5719-llvm-dda56e4b4a9c274c5c4011981bd291523e75d747.zip |
Support for C++11 (non-template) alias declarations.
llvm-svn: 129567
Diffstat (limited to 'clang/test/CXX/basic/basic.scope')
-rw-r--r-- | clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp b/clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp new file mode 100644 index 00000000000..751c0df6b86 --- /dev/null +++ b/clang/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s + +// Classes. +namespace Class { + namespace NS { + class C {}; // expected-note {{candidate}} + } + using namespace NS; + class C : C {}; // expected-error {{reference to 'C' is ambiguous}} \ + expected-note {{candidate}} +} + +// Enumerations. +enum E { + EPtrSize = sizeof((E*)0) // ok, E is already declared +}; + +// Alias declarations. clang implements the proposed resolution to N1044. +namespace Alias { + namespace NS { + class C; + } + using namespace NS; + using C = C; // ok, C = B::C + using C = NS::C; // ok, same type +} |