Author: Shafik Yaghmour Date: 2025-06-10T23:41:41-07:00 New Revision: c2cb571c6cbcec75ab401974348f9f0d9b2190db
URL: https://github.com/llvm/llvm-project/commit/c2cb571c6cbcec75ab401974348f9f0d9b2190db DIFF: https://github.com/llvm/llvm-project/commit/c2cb571c6cbcec75ab401974348f9f0d9b2190db.diff LOG: [Clang][NFC] Move UntypedParameters instead of copy (#143646) Static analysis flagged that UntypedParameters could be moved instead of copied. This would avoid copying a large object. Added: Modified: clang/lib/Sema/SemaExprCXX.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 2546ab5c0a342..c106ea749170f 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -2888,7 +2888,7 @@ static bool resolveAllocationOverload( // type-identity-less argument list. IAP.PassTypeIdentity = TypeAwareAllocationMode::No; IAP.PassAlignment = InitialAlignmentMode; - Args = UntypedParameters; + Args = std::move(UntypedParameters); } assert(!S.isStdTypeIdentity(Args[0]->getType(), nullptr)); return resolveAllocationOverloadInterior( _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits