[PATCH] D150209: [clang][Interp] Add more shift error checking
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 23:14:19 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.h:136
+ if (LHS.isNegative())
+ S.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << 12;
+ else if (LHS.toUnsigned().countLeadingZeros() < static_cast<unsigned>(RHS))
----------------
shafik wrote:
> Do we test this diagnostic?
OH! No, and the `12` was just a debug value I forgot to replace with the real thing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150209/new/
https://reviews.llvm.org/D150209
More information about the cfe-commits
mailing list