diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-28 15:18:15 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-28 15:18:15 +0000 |
commit | 0dde18e5a713bc186062ca1ebc9967500b07faee (patch) | |
tree | 05b6aadc5356f7902fd9391c9ffcc29fbdc00213 /test/SemaCXX/using-decl-templates.cpp | |
parent | 4fc7ab364110d6ad1c10dd38dbeb0597fed7e2f5 (diff) |
Instantiate unresolved using declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/using-decl-templates.cpp')
-rw-r--r-- | test/SemaCXX/using-decl-templates.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/using-decl-templates.cpp b/test/SemaCXX/using-decl-templates.cpp new file mode 100644 index 0000000000..13ee1b2dd3 --- /dev/null +++ b/test/SemaCXX/using-decl-templates.cpp @@ -0,0 +1,16 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +template<typename T> struct A { + void f() { } + struct N { }; +}; + +template<typename T> struct B : A<T> { + using A<T>::f; + using A<T>::N; + + using A<T>::foo; // expected-error{{no member named 'foo'}} + using A<double>::f; // expected-error{{using declaration refers into 'A<double>::', which is not a base class of 'B'}} +}; + +B<int> a; // expected-note{{in instantiation of template class 'struct B<int>' requested here}} |