diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-20 16:41:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-20 16:41:18 +0000 |
commit | 44e5a0a72b778627d8be3cd45340024c003666ac (patch) | |
tree | 150f6d92fa6cd8b3586177ab7e7ae6cd81f82614 /clang/test/SemaTemplate/class-template-spec.cpp | |
parent | f65d8ffca7b2ffe6227b91e82e4f40f2d0c09c75 (diff) | |
download | bcm5719-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.cpp | 10 |
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}} + }; + }; + +} |