[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 21 06:08:57 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.h:1854
+ S.FFDiag(Loc, diag::note_constexpr_invalid_cast)
+ << static_cast<uint8_t>(Kind) << S.Current->getRange(OpPC);
+ return false;
----------------
Should this be doing the cast? The overloaded operator accepts an `interp::CastKind` already?
================
Comment at: clang/lib/AST/Interp/PrimType.h:48
+ Reinterpret,
+ Dynamic,
+};
----------------
Should we bother adding this right now given it's not used or tested?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153276/new/
https://reviews.llvm.org/D153276
More information about the cfe-commits
mailing list