diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 08:14:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 08:14:57 +0000 |
commit | b0ee93cf945744569b82b8a07361061f2963264a (patch) | |
tree | 0fcbac90b812cf485435eb987a0a63fbb73cc7a6 /lib/Sema/SemaTemplate.cpp | |
parent | 3910cfd17fcd99ac80158e625fc63e4784d26435 (diff) |
A class template partial specialization cannot be a friend. Fixes PR8649.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 923e7cc30f..ca2a43b729 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -4087,6 +4087,12 @@ Sema::ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, if (TemplateParams && TemplateParams->size() > 0) { isPartialSpecialization = true; + if (TUK == TUK_Friend) { + Diag(KWLoc, diag::err_partial_specialization_friend) + << SourceRange(LAngleLoc, RAngleLoc); + return true; + } + // C++ [temp.class.spec]p10: // The template parameter list of a specialization shall not // contain default template argument values. |