https://github.com/tbaederr created 
https://github.com/llvm/llvm-project/pull/221516

None

>From ed03b0de385987fb05c88d066a8902d8fd4038cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Sun, 6 Sep 2026 06:00:55 +0200
Subject: [PATCH] [clang][bytecode] Do pointer-to-bool convesions without
 classify()

---
 clang/lib/AST/ByteCode/Compiler.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Compiler.cpp 
b/clang/lib/AST/ByteCode/Compiler.cpp
index 03f9478a6e4e0..c99f2affc6824 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -851,13 +851,14 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *E) {
   }
 
   case CK_PointerToBoolean:
-  case CK_MemberPointerToBoolean: {
-    PrimType PtrT = classifyPrim(SubExpr->getType());
+    if (!this->visit(SubExpr))
+      return false;
+    return this->emitIsNonNullPtr(E);
 
+  case CK_MemberPointerToBoolean:
     if (!this->visit(SubExpr))
       return false;
-    return this->emitIsNonNull(PtrT, E);
-  }
+    return this->emitIsNonNullMemberPtr(E);
 
   case CK_IntegralComplexToBoolean:
   case CK_FloatingComplexToBoolean: {

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

Reply via email to