[libcxx-commits] [PATCH] D131999: [libcxx] Resolve warnings for Wshift-sign-overflow
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 16 17:07:57 PDT 2022
philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM with green CI.
================
Comment at: libcxx/include/__chrono/duration.h:215
static const intmax_t __d2 = _R2::den / __gcd_d1_d2;
- static const intmax_t max = -((intmax_t(1) << (sizeof(intmax_t) * CHAR_BIT - 1)) + 1);
----------------
That's a very complex way to write `numeric_limits<intmax_t>::max()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131999/new/
https://reviews.llvm.org/D131999
More information about the libcxx-commits
mailing list