[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 06:51:39 PDT 2023


tbaeder 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;
----------------
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.


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