Skip to content

Commit 7511107

Browse files
authored
Use emplace_back instead of push_back (NFC)
1 parent fe51d8a commit 7511107

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,8 +2953,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
29532953
if (MSInfo->getPointOfInstantiation().isInvalid()) {
29542954
SourceLocation Loc = D->getLocation(); // FIXME
29552955
MSInfo->setPointOfInstantiation(Loc);
2956-
SemaRef.PendingLocalImplicitInstantiations.push_back(
2957-
std::make_pair(Function, Loc));
2956+
SemaRef.PendingLocalImplicitInstantiations.emplace_back(Function, Loc);
29582957
}
29592958
}
29602959
}
@@ -5479,8 +5478,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
54795478
// definition will be required).
54805479
assert(!Recursive);
54815480
Function->setInstantiationIsPending(true);
5482-
PendingInstantiations.push_back(
5483-
std::make_pair(Function, PointOfInstantiation));
5481+
PendingInstantiations.emplace_back(Function, PointOfInstantiation);
54845482

54855483
if (llvm::isTimeTraceVerbose()) {
54865484
llvm::timeTraceAddInstantEvent("DeferInstantiation", [&] {
@@ -6204,8 +6202,7 @@ void Sema::InstantiateVariableDefinition(SourceLocation PointOfInstantiation,
62046202
// unit.
62056203
if (!Def && !DefinitionRequired) {
62066204
if (TSK == TSK_ExplicitInstantiationDefinition) {
6207-
PendingInstantiations.push_back(
6208-
std::make_pair(Var, PointOfInstantiation));
6205+
PendingInstantiations.emplace_back(Var, PointOfInstantiation);
62096206
} else if (TSK == TSK_ImplicitInstantiation) {
62106207
// Warn about missing definition at the end of translation unit.
62116208
if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() &&

0 commit comments

Comments
 (0)