@@ -1934,12 +1934,12 @@ Parser::DeclGroupPtrTy Parser::ParseSimpleDeclaration(
1934
1934
bool RequireSemi, ForRangeInit *FRI, SourceLocation *DeclSpecStart) {
1935
1935
// Need to retain these for diagnostics before we add them to the DeclSepc.
1936
1936
ParsedAttributesView OriginalDeclSpecAttrs;
1937
- OriginalDeclSpecAttrs.addAll (DeclSpecAttrs.begin (), DeclSpecAttrs.end ());
1937
+ OriginalDeclSpecAttrs.prepend (DeclSpecAttrs.begin (), DeclSpecAttrs.end ());
1938
1938
OriginalDeclSpecAttrs.Range = DeclSpecAttrs.Range ;
1939
1939
1940
1940
// Parse the common declaration-specifiers piece.
1941
1941
ParsingDeclSpec DS (*this );
1942
- DS.takeAttributesFrom (DeclSpecAttrs);
1942
+ DS.takeAttributesAppendingingFrom (DeclSpecAttrs);
1943
1943
1944
1944
ParsedTemplateInfo TemplateInfo;
1945
1945
DeclSpecContext DSContext = getDeclSpecContextFromDeclaratorContext (Context);
@@ -2135,7 +2135,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
2135
2135
// list. This ensures that we will not attempt to interpret them as statement
2136
2136
// attributes higher up the callchain.
2137
2137
ParsedAttributes LocalAttrs (AttrFactory);
2138
- LocalAttrs.takeAllFrom (Attrs);
2138
+ LocalAttrs.takeAllPrependingFrom (Attrs);
2139
2139
ParsingDeclarator D (*this , DS, LocalAttrs, Context);
2140
2140
if (TemplateInfo.TemplateParams )
2141
2141
D.setTemplateParameterLists (*TemplateInfo.TemplateParams );
@@ -3462,7 +3462,7 @@ void Parser::ParseDeclarationSpecifiers(
3462
3462
PA.setInvalid ();
3463
3463
}
3464
3464
3465
- DS.takeAttributesFrom (attrs);
3465
+ DS.takeAttributesAppendingingFrom (attrs);
3466
3466
}
3467
3467
3468
3468
// If this is not a declaration specifier token, we're done reading decl
@@ -3689,7 +3689,7 @@ void Parser::ParseDeclarationSpecifiers(
3689
3689
if (ParseImplicitInt (DS, &SS, TemplateInfo, AS, DSContext, Attrs)) {
3690
3690
if (!Attrs.empty ()) {
3691
3691
AttrsLastTime = true ;
3692
- attrs.takeAllFrom (Attrs);
3692
+ attrs.takeAllAppendingFrom (Attrs);
3693
3693
}
3694
3694
continue ;
3695
3695
}
@@ -3854,7 +3854,7 @@ void Parser::ParseDeclarationSpecifiers(
3854
3854
if (ParseImplicitInt (DS, nullptr , TemplateInfo, AS, DSContext, Attrs)) {
3855
3855
if (!Attrs.empty ()) {
3856
3856
AttrsLastTime = true ;
3857
- attrs.takeAllFrom (Attrs);
3857
+ attrs.takeAllAppendingFrom (Attrs);
3858
3858
}
3859
3859
continue ;
3860
3860
}
@@ -4463,7 +4463,7 @@ void Parser::ParseDeclarationSpecifiers(
4463
4463
// take them over and handle them here.
4464
4464
if (!Attributes.empty ()) {
4465
4465
AttrsLastTime = true ;
4466
- attrs.takeAllFrom (Attributes);
4466
+ attrs.takeAllAppendingFrom (Attributes);
4467
4467
}
4468
4468
continue ;
4469
4469
}
@@ -4830,7 +4830,7 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope,
4830
4830
ConsumeAnyToken ();
4831
4831
4832
4832
if (OutAttrs) {
4833
- OutAttrs->takeAllFrom (Attrs);
4833
+ OutAttrs->takeAllAppendingFrom (Attrs);
4834
4834
}
4835
4835
}
4836
4836
@@ -6122,7 +6122,7 @@ void Parser::ParseTypeQualifierListOpt(
6122
6122
isAllowedCXX11AttributeSpecifier ()) {
6123
6123
ParsedAttributes Attrs (AttrFactory);
6124
6124
ParseCXX11Attributes (Attrs);
6125
- DS.takeAttributesFrom (Attrs);
6125
+ DS.takeAttributesAppendingingFrom (Attrs);
6126
6126
}
6127
6127
6128
6128
SourceLocation EndLoc;
@@ -7483,7 +7483,7 @@ void Parser::ParseParameterDeclarationClause(
7483
7483
// Take them so that we only apply the attributes to the first parameter.
7484
7484
// We have already started parsing the decl-specifier sequence, so don't
7485
7485
// parse any parameter-declaration pieces that precede it.
7486
- ArgDeclSpecAttrs.takeAllFrom (FirstArgAttrs);
7486
+ ArgDeclSpecAttrs.takeAllPrependingFrom (FirstArgAttrs);
7487
7487
} else {
7488
7488
// Parse any C++11 attributes.
7489
7489
MaybeParseCXX11Attributes (ArgDeclAttrs);
@@ -7505,7 +7505,7 @@ void Parser::ParseParameterDeclarationClause(
7505
7505
DeclSpecContext::DSC_normal,
7506
7506
/* LateAttrs=*/ nullptr , AllowImplicitTypename);
7507
7507
7508
- DS.takeAttributesFrom (ArgDeclSpecAttrs);
7508
+ DS.takeAttributesAppendingingFrom (ArgDeclSpecAttrs);
7509
7509
7510
7510
// Parse the declarator. This is "PrototypeContext" or
7511
7511
// "LambdaExprParameterContext", because we must accept either
0 commit comments