Skip to content

Commit 917b455

Browse files
authored
[clang][bytecode] Remove superfluous check for complex types (#156666)
`!E->getType()->isAnyComplexType()` is implied by `!canClassify()`.
1 parent 97d4c7d commit 917b455

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4199,8 +4199,7 @@ template <class Emitter> bool Compiler<Emitter>::visit(const Expr *E) {
41994199
return this->discard(E);
42004200

42014201
// Create local variable to hold the return value.
4202-
if (!E->isGLValue() && !E->getType()->isAnyComplexType() &&
4203-
!canClassify(E->getType())) {
4202+
if (!E->isGLValue() && !canClassify(E->getType())) {
42044203
UnsignedOrNone LocalIndex = allocateLocal(E);
42054204
if (!LocalIndex)
42064205
return false;

0 commit comments

Comments
 (0)