diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Compiler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index fd306c0..58fe2c1 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -3012,6 +3012,17 @@ bool Compiler<Emitter>::VisitCXXReinterpretCastExpr( } template <class Emitter> +bool Compiler<Emitter>::VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *E) { + + if (!Ctx.getLangOpts().CPlusPlus20) { + if (!this->emitInvalidCast(CastKind::Dynamic, /*Fatal=*/false, E)) + return false; + } + + return this->VisitCastExpr(E); +} + +template <class Emitter> bool Compiler<Emitter>::VisitCXXNoexceptExpr(const CXXNoexceptExpr *E) { assert(E->getType()->isBooleanType()); |