From 13b0321e978fd95503d5f5471a0cfdcd439a5936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 21 Feb 2024 17:21:44 +0100 Subject: [PATCH] [clang][Interp][NFC] Reject unimplemented cast expressions differently Instead of asserting, emit an appropriate diagnostic. --- clang/lib/AST/Interp/ByteCodeExprGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 0b08309e4e6e02..27e0986192165c 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"); }