[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 2 06:52:55 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.h:1761
+ S.FFDiag(Loc, diag::note_constexpr_invalid_cast)
+ << static_cast<uint8_t>(Kind) << S.Current->getRange(OpPC);
+ return false;
----------------
tbaeder wrote:
> probinson wrote:
> > Would you mind changing this cast from `uint8_t` to `unsigned`? We have an internal bot using a pickier mode of MSVC and it complains about ambiguous overloads, as the `operator<<` doesn't have anything smaller than `int` and `unsigned`.
> Feel free to push that change, I'm currently working on something else.
Yeah, that's a perfectly reasonable NFC commit to make -- go for it!
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