[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 4 02:28:25 PDT 2025


================
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext &Context,
     llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false);
     LowerValue.setBit(PrecisionBits);
     LowerValue.setSignBit();
-    return {LowerValue, UpperValue};
+    return {std::move(LowerValue), UpperValue};
----------------
carlosgalvezp wrote:

What tool did you use to get that error message?

I do not see the point of this change, please revert. We must not blindly do what tools tell us, we must critically think if they make sense or not.

https://github.com/llvm/llvm-project/pull/134138


More information about the cfe-commits mailing list