[cfe-commits] r135649 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Sean Hunt
scshunt at csclub.uwaterloo.ca
Wed Jul 20 17:59:23 PDT 2011
Author: coppro
Date: Wed Jul 20 19:59:23 2011
New Revision: 135649
URL: http://llvm.org/viewvc/llvm-project?rev=135649&view=rev
Log:
When copping out on a friend template declaration, be sure to mark its
access specifier as public.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=135649&r1=135648&r2=135649&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jul 20 19:59:23 2011
@@ -8263,11 +8263,13 @@
if (Invalid)
return 0;
- return CheckClassTemplate(S, TagSpec, TUK_Friend, TagLoc,
- SS, Name, NameLoc, Attr,
- TemplateParams, AS_public,
- TempParamLists.size() - 1,
+ Decl * Result = CheckClassTemplate(S, TagSpec, TUK_Friend, TagLoc,
+ SS, Name, NameLoc, Attr,
+ TemplateParams, AS_public,
+ TempParamLists.size() - 1,
(TemplateParameterList**) TempParamLists.release()).take();
+ Result->setAccess(AS_public);
+ return Result;
} else {
// The "template<>" header is extraneous.
Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams)
More information about the cfe-commits
mailing list