[clang] 541d5d9 - [clang][bytecode][NFC] Reject invalid FromTypes in emitBuiltinBitcast (#118274)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 02:12:24 PST 2024
Author: Timm Baeder
Date: 2024-12-02T11:12:20+01:00
New Revision: 541d5d911119d0268bc55fa1367ada5ef25f99c1
URL: https://github.com/llvm/llvm-project/commit/541d5d911119d0268bc55fa1367ada5ef25f99c1
DIFF: https://github.com/llvm/llvm-project/commit/541d5d911119d0268bc55fa1367ada5ef25f99c1.diff
LOG: [clang][bytecode][NFC] Reject invalid FromTypes in emitBuiltinBitcast (#118274)
instead of silently accepting them and failing later.
Added:
Modified:
clang/lib/AST/ByteCode/Compiler.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index 754affffb8f04a..a95353fd2943c9 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -6514,6 +6514,8 @@ bool Compiler<Emitter>::emitBuiltinBitCast(const CastExpr *E) {
return false;
if (!this->emitGetPtrLocal(TempOffset, E))
return false;
+ } else {
+ return false;
}
if (!ToT || ToT == PT_Ptr) {
More information about the cfe-commits
mailing list