diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 0b08309e4e6e0..27e0986192165 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -335,7 +335,7 @@ bool ByteCodeExprGen::VisitCastExpr(const CastExpr *CE) { return discard(SubExpr); default: - assert(false && "Cast not implemented"); + return this->emitInvalid(CE); } llvm_unreachable("Unhandled clang::CastKind enum"); }