diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-30 01:28:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-06-30 01:28:56 +0000 |
commit | 9ba0fec83e7f2eb76cbe53c899126a69827fa78d (patch) | |
tree | 72acb0a28b854a9e0f43ecd9365b388255f7e02f /clang/lib/Parse/ParseCXXInlineMethods.cpp | |
parent | a5cb3893378f7ea78bc8c9bd727809b0976207aa (diff) | |
download | bcm5719-llvm-9ba0fec83e7f2eb76cbe53c899126a69827fa78d.tar.gz bcm5719-llvm-9ba0fec83e7f2eb76cbe53c899126a69827fa78d.zip |
Rework parsing of pure-specifiers. Perform the grammar matching and
disambiguation in the parser rather than trying to do it in Sema.
llvm-svn: 241032
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index ea67a52f1fc..ab1f97d31a6 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -27,7 +27,7 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, ParsingDeclarator &D, const ParsedTemplateInfo &TemplateInfo, const VirtSpecifiers& VS, - ExprResult& Init) { + SourceLocation PureSpecLoc) { assert(D.isFunctionDeclarator() && "This isn't a function declarator!"); assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && "Current token not a '{', ':', '=', or 'try'!"); @@ -47,12 +47,8 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, VS, ICIS_NoInit); if (FnD) { Actions.ProcessDeclAttributeList(getCurScope(), FnD, AccessAttrs); - bool TypeSpecContainsAuto = D.getDeclSpec().containsPlaceholderType(); - if (Init.isUsable()) - Actions.AddInitializerToDecl(FnD, Init.get(), false, - TypeSpecContainsAuto); - else - Actions.ActOnUninitializedDecl(FnD, TypeSpecContainsAuto); + if (PureSpecLoc.isValid()) + Actions.ActOnPureSpecifier(FnD, PureSpecLoc); } } |