summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/injected-class-name.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-10 03:28:59 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-10 03:28:59 +0000
commite78aac41debf968be07fb755ba94b6fed29167b5 (patch)
treecef59ba0038ccbcc5bea1447bc23fda13fc4da45 /clang/test/SemaTemplate/injected-class-name.cpp
parent80ad1137313d04a2b2ecdf92e37a139db7094f3a (diff)
downloadbcm5719-llvm-e78aac41debf968be07fb755ba94b6fed29167b5.tar.gz
bcm5719-llvm-e78aac41debf968be07fb755ba94b6fed29167b5.zip
Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. llvm-svn: 98134
Diffstat (limited to 'clang/test/SemaTemplate/injected-class-name.cpp')
-rw-r--r--clang/test/SemaTemplate/injected-class-name.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/injected-class-name.cpp b/clang/test/SemaTemplate/injected-class-name.cpp
index 482eae14ba5..586be189b0a 100644
--- a/clang/test/SemaTemplate/injected-class-name.cpp
+++ b/clang/test/SemaTemplate/injected-class-name.cpp
@@ -42,3 +42,9 @@ struct X1 {
void f0(const X1<T, N>&); // expected-error{{redecl}}
};
+namespace pr6326 {
+ template <class T> class A {
+ friend class A;
+ };
+ template class A<int>;
+}
OpenPOWER on IntegriCloud