Author: Timm Bäder
Date: 2024-05-15T17:12:42+02:00
New Revision: 28d5f7907e8c3adb6f0e2e16c9673a99f5e07522

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

LOG: [clang][Interp][NFC] Use a smaller default size for IntegralAP

Since we later possibly initialize the value by using operator-new,
we need the default value to _not_ allocate memory.

Added: 
    

Modified: 
    clang/lib/AST/Interp/IntegralAP.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/IntegralAP.h 
b/clang/lib/AST/Interp/IntegralAP.h
index fb7ee14515715..7464f15cdb03b 100644
--- a/clang/lib/AST/Interp/IntegralAP.h
+++ b/clang/lib/AST/Interp/IntegralAP.h
@@ -61,7 +61,7 @@ template <bool Signed> class IntegralAP final {
 
   IntegralAP(APInt V) : V(V) {}
   /// Arbitrary value for uninitialized variables.
-  IntegralAP() : IntegralAP(-1, 1024) {}
+  IntegralAP() : IntegralAP(-1, 3) {}
 
   IntegralAP operator-() const { return IntegralAP(-V); }
   IntegralAP operator-(const IntegralAP &Other) const {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to