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 | 162e1c1b487352434552147967c3dd296ebee2f7 (patch) | |
| tree | 997de42e97482fd054626d9433d6bf766f93b738 /test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp | |
| parent | 98a57868d696cb5faf6195a609ad084a711c6bbe (diff) | |
| download | clang-162e1c1b487352434552147967c3dd296ebee2f7.tar.gz clang-162e1c1b487352434552147967c3dd296ebee2f7.tar.bz2 clang-162e1c1b487352434552147967c3dd296ebee2f7.tar.xz | |
Support for C++11 (non-template) alias declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp')
| -rw-r--r-- | test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp b/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp new file mode 100644 index 0000000000..751c0df6b8 --- /dev/null +++ b/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 +} |
