diff options
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}} + }; +} |