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

`!E->getType()->isAnyComplexType()` is implied by `!canClassify()`.

>From c21b63c88d0dcc12aea3811e1f07aa7e10423629 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Wed, 3 Sep 2025 15:15:31 +0200
Subject: [PATCH] [clang][bytecode] Remove superfluous check for complex types

`!E->getType()->isAnyComplexType()` is implied by `!canClassify()`.
---
 clang/lib/AST/ByteCode/Compiler.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Compiler.cpp 
b/clang/lib/AST/ByteCode/Compiler.cpp
index 56552f3969216..89ff5d27a4143 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -4199,8 +4199,7 @@ template <class Emitter> bool 
Compiler<Emitter>::visit(const Expr *E) {
     return this->discard(E);
 
   // Create local variable to hold the return value.
-  if (!E->isGLValue() && !E->getType()->isAnyComplexType() &&
-      !canClassify(E->getType())) {
+  if (!E->isGLValue() && !canClassify(E->getType())) {
     UnsignedOrNone LocalIndex = allocateLocal(E);
     if (!LocalIndex)
       return false;

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

Reply via email to