diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-16 00:58:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-16 00:58:48 +0000 |
commit | 57dd102ec8ab2e463113c75f4656c90a1209f4aa (patch) | |
tree | 028b2d88f82255e8fc149f02cca8deeec5498dfe /lib/Parse/ParseDecl.cpp | |
parent | e3521eb182b2a93328cf6bbb96120af6bc6ca104 (diff) |
[c++1z] P0195R2: Allow multiple using-declarators in a single using-declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 9dda75e3f9..ad40057473 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1506,7 +1506,6 @@ Parser::DeclGroupPtrTy Parser::ParseDeclaration(unsigned Context, ObjCDeclContextSwitch ObjCDC(*this); Decl *SingleDecl = nullptr; - Decl *OwnedType = nullptr; switch (Tok.getKind()) { case tok::kw_template: case tok::kw_export: @@ -1526,9 +1525,8 @@ Parser::DeclGroupPtrTy Parser::ParseDeclaration(unsigned Context, ProhibitAttributes(attrs); return ParseNamespace(Context, DeclEnd); case tok::kw_using: - SingleDecl = ParseUsingDirectiveOrDeclaration(Context, ParsedTemplateInfo(), - DeclEnd, attrs, &OwnedType); - break; + return ParseUsingDirectiveOrDeclaration(Context, ParsedTemplateInfo(), + DeclEnd, attrs); case tok::kw_static_assert: case tok::kw__Static_assert: ProhibitAttributes(attrs); @@ -1539,9 +1537,8 @@ Parser::DeclGroupPtrTy Parser::ParseDeclaration(unsigned Context, } // This routine returns a DeclGroup, if the thing we parsed only contains a - // single decl, convert it now. Alias declarations can also declare a type; - // include that too if it is present. - return Actions.ConvertDeclToDeclGroup(SingleDecl, OwnedType); + // single decl, convert it now. + return Actions.ConvertDeclToDeclGroup(SingleDecl); } /// simple-declaration: [C99 6.7: declaration] [C++ 7p1: dcl.dcl] |