diff options
author | John McCall <rjmccall@apple.com> | 2009-09-16 22:47:08 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-16 22:47:08 +0000 |
commit | dd4a3b0065b9a7e7b00073df415a798886c090f3 (patch) | |
tree | 50bb337b0aaedc02e16fc87594510e8f3377e080 /lib/Parse/ParseDeclCXX.cpp | |
parent | 95f29c2703facd98141330b4957568387b2a3d15 (diff) |
Improved representation and support for friend class templates. Angst about same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index e1228cf1fd..671a5421cc 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -1011,12 +1011,15 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, DeclSpec DS; ParseDeclarationSpecifiers(DS, TemplateInfo, AS, DSC_class); + Action::MultiTemplateParamsArg TemplateParams(Actions, + TemplateInfo.TemplateParams? TemplateInfo.TemplateParams->data() : 0, + TemplateInfo.TemplateParams? TemplateInfo.TemplateParams->size() : 0); + if (Tok.is(tok::semi)) { ConsumeToken(); if (DS.isFriendSpecified()) { - bool IsTemplate = TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate; - Actions.ActOnFriendTypeDecl(CurScope, DS, IsTemplate); + Actions.ActOnFriendTypeDecl(CurScope, DS, move(TemplateParams)); } else Actions.ParsedFreeStandingDeclSpec(CurScope, DS); @@ -1119,10 +1122,6 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, // this call will *not* return the created decl; It will return null. // See Sema::ActOnCXXMemberDeclarator for details. - Action::MultiTemplateParamsArg TemplateParams(Actions, - TemplateInfo.TemplateParams? TemplateInfo.TemplateParams->data() : 0, - TemplateInfo.TemplateParams? TemplateInfo.TemplateParams->size() : 0); - DeclPtrTy ThisDecl; if (DS.isFriendSpecified()) { // TODO: handle initializers, bitfields, 'delete' |