================
@@ -212,6 +212,10 @@ template <class Emitter>
bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
const Expr *SubExpr = CE->getSubExpr();
+ if (isPunningDereference(SubExpr))
+ return this->emitInvalidCast(CastKind::Reinterpret, /*Fatal=*/true,
----------------
tbaederr wrote:
I think it would be better to call this when we already switch'ed for the cast
kind later.
https://github.com/llvm/llvm-project/pull/163809
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits