[clang] cdde0d9 - [clang][Interp][NFC] Make a local variable const

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 13:39:42 PST 2024


Author: Timm Bäder
Date: 2024-02-08T22:39:23+01:00
New Revision: cdde0d9602217eb0bc091b4de16197e6aa5bb132

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

LOG: [clang][Interp][NFC] Make a local variable const

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 a76e63395157f7..1299a70c01548c 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -811,7 +811,7 @@ bool CMP3(InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo) {
   const auto *CmpValueInfo = CmpInfo->getValueInfo(CmpResult);
   assert(CmpValueInfo);
   assert(CmpValueInfo->hasValidIntValue());
-  APSInt IntValue = CmpValueInfo->getIntValue();
+  const APSInt &IntValue = CmpValueInfo->getIntValue();
   return SetThreeWayComparisonField(S, OpPC, P, IntValue);
 }
 


        


More information about the cfe-commits mailing list