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

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 13:49:46 PDT 2023


probinson 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;
----------------
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`.


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