aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <tbaeder@redhat.com>2024-02-21 17:21:44 +0100
committerTimm Bäder <tbaeder@redhat.com>2024-02-21 17:26:29 +0100
commit13b0321e978fd95503d5f5471a0cfdcd439a5936 (patch)
tree1e893cc78eab7a1456e2b7a38e5832b4e7e3033e
parent453b1a2fce3c46e866131797f876976032cff384 (diff)
downloadllvm-13b0321e978fd95503d5f5471a0cfdcd439a5936.zip
llvm-13b0321e978fd95503d5f5471a0cfdcd439a5936.tar.gz
llvm-13b0321e978fd95503d5f5471a0cfdcd439a5936.tar.bz2
[clang][Interp][NFC] Reject unimplemented cast expressions differently
Instead of asserting, emit an appropriate diagnostic.
-rw-r--r--clang/lib/AST/Interp/ByteCodeExprGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 0b08309..27e0986 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -335,7 +335,7 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
return discard(SubExpr);
default:
- assert(false && "Cast not implemented");
+ return this->emitInvalid(CE);
}
llvm_unreachable("Unhandled clang::CastKind enum");
}