[clang] f8fe400 - [clang][Interp][NFC] Make IntegralAP::isSigned() constexpr

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 29 06:15:59 PDT 2023


Author: Timm Bäder
Date: 2023-10-29T14:15:44+01:00
New Revision: f8fe40090ab302921bc4b83969bfec8b31c902aa

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

LOG: [clang][Interp][NFC] Make IntegralAP::isSigned() constexpr

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 45e5b49546270aa..cfed9ca29336d2e 100644
--- a/clang/lib/AST/Interp/IntegralAP.h
+++ b/clang/lib/AST/Interp/IntegralAP.h
@@ -124,7 +124,7 @@ template <bool Signed> class IntegralAP final {
   bool isNegative() const { return !V.isNonNegative(); }
   bool isMin() const { return V.isMinValue(); }
   bool isMax() const { return V.isMaxValue(); }
-  static bool isSigned() { return Signed; }
+  static constexpr bool isSigned() { return Signed; }
   bool isMinusOne() const { return Signed && V == -1; }
 
   unsigned countLeadingZeros() const { return V.countl_zero(); }


        


More information about the cfe-commits mailing list