Author: Timm Baeder
Date: 2026-06-14T08:17:25+02:00
New Revision: 0a2565d7c6dd196eceb8c93befde1150d78790b7

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

LOG: [clang][bytecode] Use `isSignedType()` in `pushInteger` (#203670)

We need to classify here anyway, so use the information from the
primtype.

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/InterpBuiltin.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp 
b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 5f8681ef38492..5076d27766e25 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -113,7 +113,7 @@ static void pushInteger(InterpState &S, const APSInt &Val, 
QualType QT) {
     return;
   }
 
-  if (QT->isSignedIntegerOrEnumerationType()) {
+  if (isSignedType(*T)) {
     int64_t V = Val.getSExtValue();
     INT_TYPE_SWITCH(*T, { S.Stk.push<T>(T::from(V)); });
   } else {


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to