summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/alias-templates.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-08-15 23:59:20 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-08-15 23:59:20 +0000
commit2a1d9a92903473486b2e476e065658c34039cad2 (patch)
treeaa008f799a184fa3ae3d8d464ebd84ea3893f57e /clang/test/SemaTemplate/alias-templates.cpp
parent89065d8632cc69b87bbf0ecaecb1689d53ec0c3d (diff)
downloadbcm5719-llvm-2a1d9a92903473486b2e476e065658c34039cad2.tar.gz
bcm5719-llvm-2a1d9a92903473486b2e476e065658c34039cad2.zip
Fix for dependent contexts in alias templates.
When we are parsing a type for an alias template, we are not entering the context, so we can't look into dependent classes. Make sure the parser handles this correctly. PR16904. llvm-svn: 188510
Diffstat (limited to 'clang/test/SemaTemplate/alias-templates.cpp')
-rw-r--r--clang/test/SemaTemplate/alias-templates.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/alias-templates.cpp b/clang/test/SemaTemplate/alias-templates.cpp
index eeb6b951897..e7be184db3d 100644
--- a/clang/test/SemaTemplate/alias-templates.cpp
+++ b/clang/test/SemaTemplate/alias-templates.cpp
@@ -189,3 +189,15 @@ namespace PR16646 {
}
}
}
+
+namespace PR16904 {
+ template <typename,typename>
+ struct base {
+ template <typename> struct derived;
+ };
+ // FIXME: The diagnostics here are terrible.
+ template <typename T, typename U, typename V>
+ using derived = base<T, U>::template derived<V>; // expected-error {{expected a type}} expected-error {{expected ';'}}
+ template <typename T, typename U, typename V>
+ using derived2 = ::PR16904::base<T, U>::template derived<V>; // expected-error {{expected a type}} expected-error {{expected ';'}}
+}
OpenPOWER on IntegriCloud