summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/class-template-spec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-20 16:41:18 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-20 16:41:18 +0000
commit44e5a0a72b778627d8be3cd45340024c003666ac (patch)
tree150f6d92fa6cd8b3586177ab7e7ae6cd81f82614 /clang/test/SemaTemplate/class-template-spec.cpp
parentf65d8ffca7b2ffe6227b91e82e4f40f2d0c09c75 (diff)
downloadbcm5719-llvm-44e5a0a72b778627d8be3cd45340024c003666ac.tar.gz
bcm5719-llvm-44e5a0a72b778627d8be3cd45340024c003666ac.zip
Diagnose class template (partial) specializations that occur in the
*wrong* class scope. This is one of the problems behind <rdar://problem/9676205>. llvm-svn: 142588
Diffstat (limited to 'clang/test/SemaTemplate/class-template-spec.cpp')
-rw-r--r--clang/test/SemaTemplate/class-template-spec.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp
index 07a5e2982c7..8213a726359 100644
--- a/clang/test/SemaTemplate/class-template-spec.cpp
+++ b/clang/test/SemaTemplate/class-template-spec.cpp
@@ -109,3 +109,13 @@ Foo<int> x;
// Template template parameters
template<template<class T> class Wibble>
class Wibble<int> { }; // expected-error{{cannot specialize a template template parameter}}
+
+namespace rdar9676205 {
+ template<typename T>
+ struct X {
+ template<typename U>
+ struct X<U*> { // expected-error{{explicit specialization of 'X' in class scope}}
+ };
+ };
+
+}
OpenPOWER on IntegriCloud