[PATCH] D132813: [Support] Simplify isInt and isUInt with constexpr if (NFC)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 28 12:43:59 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/include/llvm/Support/MathExtras.h:369
+ return -(INT64_C(1) << (N - 1)) <= x && x < (INT64_C(1) << (N - 1));
+ (void)x; // MSVC v19.25 warns that x is unused.
+ return true;
----------------
craig.topper wrote:
> tschuett wrote:
> > You can use `[[maybe_unused]]` instead if you like.
> Does it warn if you use elses? I know there was some constexpr if comments added to the no else after return guidance here https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
Nevermind that probably won't help.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132813/new/
https://reviews.llvm.org/D132813
More information about the llvm-commits
mailing list