Skip to content

Commit 989573d

Browse files
committed
[clang][bytecode][NFC] Reject invalid FromTypes in emitBuiltinBitcast
instead of silently accepting them and failing later.
1 parent 2b3266c commit 989573d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6514,6 +6514,8 @@ bool Compiler<Emitter>::emitBuiltinBitCast(const CastExpr *E) {
65146514
return false;
65156515
if (!this->emitGetPtrLocal(TempOffset, E))
65166516
return false;
6517+
} else {
6518+
return false;
65176519
}
65186520

65196521
if (!ToT || ToT == PT_Ptr) {

0 commit comments

Comments
 (0)