Skip to content

Commit 13b0321

Browse files
committed
[clang][Interp][NFC] Reject unimplemented cast expressions differently
Instead of asserting, emit an appropriate diagnostic.
1 parent 453b1a2 commit 13b0321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
335335
return discard(SubExpr);
336336

337337
default:
338-
assert(false && "Cast not implemented");
338+
return this->emitInvalid(CE);
339339
}
340340
llvm_unreachable("Unhandled clang::CastKind enum");
341341
}

0 commit comments

Comments
 (0)