[clang] f15a790 - Remove use of reference lifetime extension introduced in cdde0d9

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 09:03:24 PDT 2024


Author: David Blaikie
Date: 2024-03-13T16:03:16Z
New Revision: f15a790fd383665ec4defa0711e975476fd8b18b

URL: https://github.com/llvm/llvm-project/commit/f15a790fd383665ec4defa0711e975476fd8b18b
DIFF: https://github.com/llvm/llvm-project/commit/f15a790fd383665ec4defa0711e975476fd8b18b.diff

LOG: Remove use of reference lifetime extension introduced in cdde0d9

Rather than dealing with which is more readable, the named variable
doesn't seem to add value here - so omit it.

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 bb220657c2dadc..db80e2d59753f8 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -846,8 +846,7 @@ bool CMP3(InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo) {
       CmpInfo->getValueInfo(CmpInfo->makeWeakResult(CmpResult));
   assert(CmpValueInfo);
   assert(CmpValueInfo->hasValidIntValue());
-  const APSInt &IntValue = CmpValueInfo->getIntValue();
-  return SetThreeWayComparisonField(S, OpPC, P, IntValue);
+  return SetThreeWayComparisonField(S, OpPC, P, CmpValueInfo->getIntValue());
 }
 
 template <PrimType Name, class T = typename PrimConv<Name>::T>


        


More information about the cfe-commits mailing list