[clang] 13b0321 - [clang][Interp][NFC] Reject unimplemented cast expressions differently
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 08:26:57 PST 2024
Author: Timm Bäder
Date: 2024-02-21T17:26:29+01:00
New Revision: 13b0321e978fd95503d5f5471a0cfdcd439a5936
URL: https://github.com/llvm/llvm-project/commit/13b0321e978fd95503d5f5471a0cfdcd439a5936
DIFF: https://github.com/llvm/llvm-project/commit/13b0321e978fd95503d5f5471a0cfdcd439a5936.diff
LOG: [clang][Interp][NFC] Reject unimplemented cast expressions differently
Instead of asserting, emit an appropriate diagnostic.
Added:
Modified:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
Removed:
################################################################################
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<Emitter>::VisitCastExpr(const CastExpr *CE) {
return discard(SubExpr);
default:
- assert(false && "Cast not implemented");
+ return this->emitInvalid(CE);
}
llvm_unreachable("Unhandled clang::CastKind enum");
}
More information about the cfe-commits
mailing list