Author: Timm Bäder Date: 2023-10-19T14:21:52+02:00 New Revision: 93373c3da9416e52d3f516435500e04a7d142370
URL: https://github.com/llvm/llvm-project/commit/93373c3da9416e52d3f516435500e04a7d142370 DIFF: https://github.com/llvm/llvm-project/commit/93373c3da9416e52d3f516435500e04a7d142370.diff LOG: [clang][Interp][NFC] Use a const reference in IncDecHelper Added: Modified: clang/lib/AST/Interp/Interp.h Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h index 4b081301655cfb2..7ef1e344224a3c3 100644 --- a/clang/lib/AST/Interp/Interp.h +++ b/clang/lib/AST/Interp/Interp.h @@ -522,7 +522,7 @@ enum class IncDecOp { template <typename T, IncDecOp Op, PushVal DoPush> bool IncDecHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { - T Value = Ptr.deref<T>(); + const T &Value = Ptr.deref<T>(); T Result; if constexpr (DoPush == PushVal::Yes) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits