Skip to content

Commit 63703ab

Browse files
committed
Rename functions again (NFC)
Rename from AppendFrom/PrependFrom to AppendingFrom/PrependingFrom.
1 parent cc15fc4 commit 63703ab

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

clang/include/clang/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ class Parser : public CodeCompletionHandler {
22922292
ParsedAttributes AttrsWithRange(AttrFactory);
22932293
ParseMicrosoftAttributes(AttrsWithRange);
22942294
AttrsParsed = !AttrsWithRange.empty();
2295-
Attrs.takeAllAppendFrom(AttrsWithRange);
2295+
Attrs.takeAllAppendingFrom(AttrsWithRange);
22962296
}
22972297
return AttrsParsed;
22982298
}

clang/include/clang/Sema/DeclSpec.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,8 @@ class DeclSpec {
843843
ParsedAttributes &getAttributes() { return Attrs; }
844844
const ParsedAttributes &getAttributes() const { return Attrs; }
845845

846-
void takeAttributesAppendFrom(ParsedAttributes &attrs) {
847-
Attrs.takeAllAppendFrom(attrs);
846+
void takeAttributesAppendingFrom(ParsedAttributes &attrs) {
847+
Attrs.takeAllAppendingFrom(attrs);
848848
}
849849

850850
/// Finish - This does final analysis of the declspec, issuing diagnostics for
@@ -2648,7 +2648,7 @@ class Declarator {
26482648
///
26492649
/// Also extends the range of the declarator.
26502650
void takeAttributesAppend(ParsedAttributes &attrs) {
2651-
Attrs.takeAllAppendFrom(attrs);
2651+
Attrs.takeAllAppendingFrom(attrs);
26522652

26532653
if (attrs.Range.getEnd().isValid())
26542654
SetRangeEnd(attrs.Range.getEnd());

clang/include/clang/Sema/ParsedAttr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,15 +943,15 @@ class ParsedAttributes : public ParsedAttributesView {
943943

944944
AttributePool &getPool() const { return pool; }
945945

946-
void takeAllPrependFrom(ParsedAttributes &Other) {
946+
void takeAllPrependingFrom(ParsedAttributes &Other) {
947947
assert(&Other != this &&
948948
"ParsedAttributes can't take attributes from itself");
949949
prependAll(Other.begin(), Other.end());
950950
Other.clearListOnly();
951951
pool.takeAllFrom(Other.pool);
952952
}
953953

954-
void takeAllAppendFrom(ParsedAttributes &Other) {
954+
void takeAllAppendingFrom(ParsedAttributes &Other) {
955955
assert(&Other != this &&
956956
"ParsedAttributes can't take attributes from itself");
957957
appendAll(Other.begin(), Other.end());

clang/lib/Parse/ParseDecl.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ Parser::DeclGroupPtrTy Parser::ParseSimpleDeclaration(
19401940

19411941
// Parse the common declaration-specifiers piece.
19421942
ParsingDeclSpec DS(*this);
1943-
DS.takeAttributesAppendFrom(DeclSpecAttrs);
1943+
DS.takeAttributesAppendingFrom(DeclSpecAttrs);
19441944

19451945
ParsedTemplateInfo TemplateInfo;
19461946
DeclSpecContext DSContext = getDeclSpecContextFromDeclaratorContext(Context);
@@ -2136,7 +2136,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
21362136
// list. This ensures that we will not attempt to interpret them as statement
21372137
// attributes higher up the callchain.
21382138
ParsedAttributes LocalAttrs(AttrFactory);
2139-
LocalAttrs.takeAllPrependFrom(Attrs);
2139+
LocalAttrs.takeAllPrependingFrom(Attrs);
21402140
ParsingDeclarator D(*this, DS, LocalAttrs, Context);
21412141
if (TemplateInfo.TemplateParams)
21422142
D.setTemplateParameterLists(*TemplateInfo.TemplateParams);
@@ -3463,7 +3463,7 @@ void Parser::ParseDeclarationSpecifiers(
34633463
PA.setInvalid();
34643464
}
34653465

3466-
DS.takeAttributesAppendFrom(attrs);
3466+
DS.takeAttributesAppendingFrom(attrs);
34673467
}
34683468

34693469
// If this is not a declaration specifier token, we're done reading decl
@@ -3690,7 +3690,7 @@ void Parser::ParseDeclarationSpecifiers(
36903690
if (ParseImplicitInt(DS, &SS, TemplateInfo, AS, DSContext, Attrs)) {
36913691
if (!Attrs.empty()) {
36923692
AttrsLastTime = true;
3693-
attrs.takeAllAppendFrom(Attrs);
3693+
attrs.takeAllAppendingFrom(Attrs);
36943694
}
36953695
continue;
36963696
}
@@ -3855,7 +3855,7 @@ void Parser::ParseDeclarationSpecifiers(
38553855
if (ParseImplicitInt(DS, nullptr, TemplateInfo, AS, DSContext, Attrs)) {
38563856
if (!Attrs.empty()) {
38573857
AttrsLastTime = true;
3858-
attrs.takeAllAppendFrom(Attrs);
3858+
attrs.takeAllAppendingFrom(Attrs);
38593859
}
38603860
continue;
38613861
}
@@ -4464,7 +4464,7 @@ void Parser::ParseDeclarationSpecifiers(
44644464
// take them over and handle them here.
44654465
if (!Attributes.empty()) {
44664466
AttrsLastTime = true;
4467-
attrs.takeAllAppendFrom(Attributes);
4467+
attrs.takeAllAppendingFrom(Attributes);
44684468
}
44694469
continue;
44704470
}
@@ -4831,7 +4831,7 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope,
48314831
ConsumeAnyToken();
48324832

48334833
if (OutAttrs) {
4834-
OutAttrs->takeAllAppendFrom(Attrs);
4834+
OutAttrs->takeAllAppendingFrom(Attrs);
48354835
}
48364836
}
48374837

@@ -6123,7 +6123,7 @@ void Parser::ParseTypeQualifierListOpt(
61236123
isAllowedCXX11AttributeSpecifier()) {
61246124
ParsedAttributes Attrs(AttrFactory);
61256125
ParseCXX11Attributes(Attrs);
6126-
DS.takeAttributesAppendFrom(Attrs);
6126+
DS.takeAttributesAppendingFrom(Attrs);
61276127
}
61286128

61296129
SourceLocation EndLoc;
@@ -7484,7 +7484,7 @@ void Parser::ParseParameterDeclarationClause(
74847484
// Take them so that we only apply the attributes to the first parameter.
74857485
// We have already started parsing the decl-specifier sequence, so don't
74867486
// parse any parameter-declaration pieces that precede it.
7487-
ArgDeclSpecAttrs.takeAllPrependFrom(FirstArgAttrs);
7487+
ArgDeclSpecAttrs.takeAllPrependingFrom(FirstArgAttrs);
74887488
} else {
74897489
// Parse any C++11 attributes.
74907490
MaybeParseCXX11Attributes(ArgDeclAttrs);
@@ -7506,7 +7506,7 @@ void Parser::ParseParameterDeclarationClause(
75067506
DeclSpecContext::DSC_normal,
75077507
/*LateAttrs=*/nullptr, AllowImplicitTypename);
75087508

7509-
DS.takeAttributesAppendFrom(ArgDeclSpecAttrs);
7509+
DS.takeAttributesAppendingFrom(ArgDeclSpecAttrs);
75107510

75117511
// Parse the declarator. This is "PrototypeContext" or
75127512
// "LambdaExprParameterContext", because we must accept either

clang/lib/Parse/ParseDeclCXX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration(
739739
<< FixItHint::CreateInsertionFromRange(
740740
Tok.getLocation(), CharSourceRange::getTokenRange(Range))
741741
<< FixItHint::CreateRemoval(Range);
742-
Attrs.takeAllPrependFrom(MisplacedAttrs);
742+
Attrs.takeAllPrependingFrom(MisplacedAttrs);
743743
}
744744

745745
// Maybe this is an alias-declaration.
@@ -1948,7 +1948,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
19481948

19491949
// Recover by adding misplaced attributes to the attribute list
19501950
// of the class so they can be applied on the class later.
1951-
attrs.takeAllAppendFrom(Attributes);
1951+
attrs.takeAllAppendingFrom(Attributes);
19521952
}
19531953
}
19541954

@@ -2842,7 +2842,7 @@ Parser::DeclGroupPtrTy Parser::ParseCXXClassMemberDeclaration(
28422842
// decl-specifier-seq:
28432843
// Parse the common declaration-specifiers piece.
28442844
ParsingDeclSpec DS(*this, TemplateDiags);
2845-
DS.takeAttributesAppendFrom(DeclSpecAttrs);
2845+
DS.takeAttributesAppendingFrom(DeclSpecAttrs);
28462846

28472847
if (MalformedTypeSpec)
28482848
DS.SetTypeSpecError();

clang/lib/Parse/ParseObjc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void Parser::MaybeSkipAttributes(tok::ObjCKeywordKind Kind) {
4343
Parser::DeclGroupPtrTy
4444
Parser::ParseObjCAtDirectives(ParsedAttributes &DeclAttrs,
4545
ParsedAttributes &DeclSpecAttrs) {
46-
DeclAttrs.takeAllPrependFrom(DeclSpecAttrs);
46+
DeclAttrs.takeAllPrependingFrom(DeclSpecAttrs);
4747

4848
SourceLocation AtLoc = ConsumeToken(); // the "@"
4949

clang/lib/Parse/ParseStmt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs,
718718
// and followed by a semicolon, GCC will reject (it appears to parse the
719719
// attributes as part of a statement in that case). That looks like a bug.
720720
if (!getLangOpts().CPlusPlus || Tok.is(tok::semi))
721-
Attrs.takeAllAppendFrom(TempAttrs);
721+
Attrs.takeAllAppendingFrom(TempAttrs);
722722
else {
723723
StmtVector Stmts;
724724
ParsedAttributes EmptyCXX11Attrs(AttrFactory);
@@ -2407,7 +2407,7 @@ StmtResult Parser::ParsePragmaLoopHint(StmtVector &Stmts,
24072407
Stmts, StmtCtx, TrailingElseLoc, Attrs, EmptyDeclSpecAttrs,
24082408
PrecedingLabel);
24092409

2410-
Attrs.takeAllPrependFrom(TempAttrs);
2410+
Attrs.takeAllPrependingFrom(TempAttrs);
24112411

24122412
// Start of attribute range may already be set for some invalid input.
24132413
// See PR46336.

clang/lib/Parse/ParseTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclarationAfterTemplate(
196196
ParsingDeclSpec DS(*this, &DiagsFromTParams);
197197
DS.SetRangeStart(DeclSpecAttrs.Range.getBegin());
198198
DS.SetRangeEnd(DeclSpecAttrs.Range.getEnd());
199-
DS.takeAttributesAppendFrom(DeclSpecAttrs);
199+
DS.takeAttributesAppendingFrom(DeclSpecAttrs);
200200

201201
ParseDeclarationSpecifiers(DS, TemplateInfo, AS,
202202
getDeclSpecContextFromDeclaratorContext(Context));

clang/lib/Parse/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclOrFunctionDefInternal(
10831083
"expected uninitialised source range");
10841084
DS.SetRangeStart(DeclSpecAttrs.Range.getBegin());
10851085
DS.SetRangeEnd(DeclSpecAttrs.Range.getEnd());
1086-
DS.takeAttributesAppendFrom(DeclSpecAttrs);
1086+
DS.takeAttributesAppendingFrom(DeclSpecAttrs);
10871087

10881088
ParsedTemplateInfo TemplateInfo;
10891089
MaybeParseMicrosoftAttributes(DS.getAttributes());
@@ -1155,7 +1155,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclOrFunctionDefInternal(
11551155
}
11561156

11571157
DS.abort();
1158-
DS.takeAttributesAppendFrom(Attrs);
1158+
DS.takeAttributesAppendingFrom(Attrs);
11591159

11601160
const char *PrevSpec = nullptr;
11611161
unsigned DiagID;

clang/lib/Sema/DeclSpec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ DeclaratorChunk DeclaratorChunk::getFunction(bool hasProto,
197197
[&](DeclSpec::TQ TypeQual, StringRef PrintName, SourceLocation SL) {
198198
I.Fun.MethodQualifiers->SetTypeQual(TypeQual, SL);
199199
});
200-
I.Fun.MethodQualifiers->getAttributes().takeAllPrependFrom(attrs);
200+
I.Fun.MethodQualifiers->getAttributes().takeAllPrependingFrom(attrs);
201201
I.Fun.MethodQualifiers->getAttributePool().takeAllFrom(attrs.getPool());
202202
}
203203

0 commit comments

Comments
 (0)