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 | 4bd7875b9cf4e5a2f68b554db0456200a97b4280 (patch) | |
tree | 14ca5a12a2707500701d6137b284d094f679bd1a /clang/test/SemaCXX/using-decl-templates.cpp | |
parent | 8b899e424718788712fe10a42fde919ff3bc0362 (diff) | |
download | bcm5719-llvm-4bd7875b9cf4e5a2f68b554db0456200a97b4280.tar.gz bcm5719-llvm-4bd7875b9cf4e5a2f68b554db0456200a97b4280.zip |
Instantiate unresolved using declarations.
llvm-svn: 80366
Diffstat (limited to 'clang/test/SemaCXX/using-decl-templates.cpp')
-rw-r--r-- | clang/test/SemaCXX/using-decl-templates.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/using-decl-templates.cpp b/clang/test/SemaCXX/using-decl-templates.cpp new file mode 100644 index 00000000000..13ee1b2dd3e --- /dev/null +++ b/clang/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}} |