Skip to content

Commit 100ec90

Browse files
shafikrorth
authored andcommitted
[Clang][NFC] Move UntypedParameters instead of copy (llvm#143646)
Static analysis flagged that UntypedParameters could be moved instead of copied. This would avoid copying a large object.
1 parent ff5d3b2 commit 100ec90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2888,7 +2888,7 @@ static bool resolveAllocationOverload(
28882888
// type-identity-less argument list.
28892889
IAP.PassTypeIdentity = TypeAwareAllocationMode::No;
28902890
IAP.PassAlignment = InitialAlignmentMode;
2891-
Args = UntypedParameters;
2891+
Args = std::move(UntypedParameters);
28922892
}
28932893
assert(!S.isStdTypeIdentity(Args[0]->getType(), nullptr));
28942894
return resolveAllocationOverloadInterior(

0 commit comments

Comments
 (0)