diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index d6cd7eb..e4b158e 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -1934,12 +1934,12 @@ Parser::DeclGroupPtrTy Parser::ParseSimpleDeclaration( bool RequireSemi, ForRangeInit *FRI, SourceLocation *DeclSpecStart) { // Need to retain these for diagnostics before we add them to the DeclSepc. ParsedAttributesView OriginalDeclSpecAttrs; - OriginalDeclSpecAttrs.addAll(DeclSpecAttrs.begin(), DeclSpecAttrs.end()); + OriginalDeclSpecAttrs.prepend(DeclSpecAttrs.begin(), DeclSpecAttrs.end()); OriginalDeclSpecAttrs.Range = DeclSpecAttrs.Range; // Parse the common declaration-specifiers piece. ParsingDeclSpec DS(*this); - DS.takeAttributesFrom(DeclSpecAttrs); + DS.takeAttributesAppendingingFrom(DeclSpecAttrs); ParsedTemplateInfo TemplateInfo; DeclSpecContext DSContext = getDeclSpecContextFromDeclaratorContext(Context); @@ -2135,7 +2135,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, // list. This ensures that we will not attempt to interpret them as statement // attributes higher up the callchain. ParsedAttributes LocalAttrs(AttrFactory); - LocalAttrs.takeAllFrom(Attrs); + LocalAttrs.takeAllPrependingFrom(Attrs); ParsingDeclarator D(*this, DS, LocalAttrs, Context); if (TemplateInfo.TemplateParams) D.setTemplateParameterLists(*TemplateInfo.TemplateParams); @@ -3462,7 +3462,7 @@ void Parser::ParseDeclarationSpecifiers( PA.setInvalid(); } - DS.takeAttributesFrom(attrs); + DS.takeAttributesAppendingingFrom(attrs); } // If this is not a declaration specifier token, we're done reading decl @@ -3689,7 +3689,7 @@ void Parser::ParseDeclarationSpecifiers( if (ParseImplicitInt(DS, &SS, TemplateInfo, AS, DSContext, Attrs)) { if (!Attrs.empty()) { AttrsLastTime = true; - attrs.takeAllFrom(Attrs); + attrs.takeAllAppendingFrom(Attrs); } continue; } @@ -3854,7 +3854,7 @@ void Parser::ParseDeclarationSpecifiers( if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) { if (!Attrs.empty()) { AttrsLastTime = true; - attrs.takeAllFrom(Attrs); + attrs.takeAllAppendingFrom(Attrs); } continue; } @@ -4463,7 +4463,7 @@ void Parser::ParseDeclarationSpecifiers( // take them over and handle them here. if (!Attributes.empty()) { AttrsLastTime = true; - attrs.takeAllFrom(Attributes); + attrs.takeAllAppendingFrom(Attributes); } continue; } @@ -4830,7 +4830,7 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope, ConsumeAnyToken(); if (OutAttrs) { - OutAttrs->takeAllFrom(Attrs); + OutAttrs->takeAllAppendingFrom(Attrs); } } @@ -6122,7 +6122,7 @@ void Parser::ParseTypeQualifierListOpt( isAllowedCXX11AttributeSpecifier()) { ParsedAttributes Attrs(AttrFactory); ParseCXX11Attributes(Attrs); - DS.takeAttributesFrom(Attrs); + DS.takeAttributesAppendingingFrom(Attrs); } SourceLocation EndLoc; @@ -7483,7 +7483,7 @@ void Parser::ParseParameterDeclarationClause( // Take them so that we only apply the attributes to the first parameter. // We have already started parsing the decl-specifier sequence, so don't // parse any parameter-declaration pieces that precede it. - ArgDeclSpecAttrs.takeAllFrom(FirstArgAttrs); + ArgDeclSpecAttrs.takeAllPrependingFrom(FirstArgAttrs); } else { // Parse any C++11 attributes. MaybeParseCXX11Attributes(ArgDeclAttrs); @@ -7505,7 +7505,7 @@ void Parser::ParseParameterDeclarationClause( DeclSpecContext::DSC_normal, /*LateAttrs=*/nullptr, AllowImplicitTypename); - DS.takeAttributesFrom(ArgDeclSpecAttrs); + DS.takeAttributesAppendingingFrom(ArgDeclSpecAttrs); // Parse the declarator. This is "PrototypeContext" or // "LambdaExprParameterContext", because we must accept either |