diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-20 15:58:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-20 15:58:54 +0000 |
commit | f65d8ffca7b2ffe6227b91e82e4f40f2d0c09c75 (patch) | |
tree | 9a5e5011113e77a03de138169aaa2e982128601b /clang/test | |
parent | 9036c5cf2bd0a39e07f18c980c2c11694818758a (diff) | |
download | bcm5719-llvm-f65d8ffca7b2ffe6227b91e82e4f40f2d0c09c75.tar.gz bcm5719-llvm-f65d8ffca7b2ffe6227b91e82e4f40f2d0c09c75.zip |
When we parse something that looks like a templated friend tag but
actually just has an extraneous 'template<>' header, strip off the
'template<>' header and treat it as a normal friend tag. Fixes PR10660
/ <rdar://problem/9958322>.
llvm-svn: 142587
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaTemplate/friend-template.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/friend-template.cpp b/clang/test/SemaTemplate/friend-template.cpp index d1284de35f1..152df37d3db 100644 --- a/clang/test/SemaTemplate/friend-template.cpp +++ b/clang/test/SemaTemplate/friend-template.cpp @@ -224,3 +224,9 @@ namespace friend_type_template_no_tag { }; template struct S<int>; } + +namespace PR10660 { + struct A { + template <> friend class B; // expected-error{{extraneous 'template<>' in declaration of class 'B'}} + }; +} |