diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaCXX/using-decl-1.cpp | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/SemaCXX/using-decl-1.cpp')
-rw-r--r-- | test/SemaCXX/using-decl-1.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/SemaCXX/using-decl-1.cpp b/test/SemaCXX/using-decl-1.cpp index 30c4cfd..ebe97f6 100644 --- a/test/SemaCXX/using-decl-1.cpp +++ b/test/SemaCXX/using-decl-1.cpp @@ -95,3 +95,26 @@ namespace test1 { foo(p); // expected-error {{no matching function}} } } + +namespace test2 { + namespace ns { int foo; } + template <class T> using ns::foo; // expected-error {{cannot template a using declaration}} + + // PR8022 + struct A { + template <typename T> void f(T); + }; + class B : A { + template <typename T> using A::f<T>; // expected-error {{cannot template a using declaration}} + }; +} + +// PR8756 +namespace foo +{ + class Class1; // expected-note{{forward declaration}} + class Class2 + { + using ::foo::Class1::Function; // expected-error{{incomplete type 'foo::Class1' named in nested name specifier}} + }; +} |