diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-09-04 07:40:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-04 07:40:48 +0200 |
commit | 917b45539b8c265665c7376c09f512c4c11c42a8 (patch) | |
tree | 49fa94d59c24a05f1a9437f3d04ac4053f2feaf3 /clang/lib/AST/ByteCode/Compiler.cpp | |
parent | 97d4c7d1eb1bb5d0a5e61867fa9594c6d5875d86 (diff) | |
download | llvm-917b45539b8c265665c7376c09f512c4c11c42a8.zip llvm-917b45539b8c265665c7376c09f512c4c11c42a8.tar.gz llvm-917b45539b8c265665c7376c09f512c4c11c42a8.tar.bz2 |
[clang][bytecode] Remove superfluous check for complex types (#156666)
`!E->getType()->isAnyComplexType()` is implied by `!canClassify()`.
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index 56552f3..89ff5d2 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; |