These warning were identified while debugging modules with Wsystem-headers.
Details
- Reviewers
philnik ldionne - Group Reviewers
Restricted Project - Commits
- rG774c39313e83: [libcxx] Resolve warnings for Wshift-sign-overflow
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks! LGTM with green CI.
libcxx/include/__chrono/duration.h | ||
---|---|---|
215 | That's a very complex way to write numeric_limits<intmax_t>::max(). |
libcxx/include/__chrono/duration.h | ||
---|---|---|
215 | I think clang-tidy currently only checks parameters and private non-static members. I'm sure there is a configuration for readability-identifier-naming for this case. I'll check that when the simpler cases are checked. (BTW readability- is a complete misnomer for our purposes). |
libcxx/include/__chrono/duration.h | ||
---|---|---|
215 | Ah that explains it. I thought it did all privates.
:-D good luck filing a bug report ;-) | |
215 |
|
Hmm apparently there's some CUDA builder failures, so I've reverted for now.
https://lab.llvm.org/buildbot#builders/1/builds/33677
https://lab.llvm.org/buildbot#builders/55/builds/33820
https://lab.llvm.org/buildbot#builders/46/builds/33687
/ssd/cuda-k80-0/work/clang-cuda-k80/clang/bin/../include/c++/v1/ratio:143:33: error: in-class initializer for static data member is not a constant expression static const intmax_t min = numeric_limits<intmax_t>::min() + 1;
Do these computations need to be marked constexpr? I think the underlying one in numeric_limit is already _LIBCPP_CONSTEXPR.
@ddcc Please ensure that the pre-commit CI is green before landing. This failure will probably get catched there.
That's a very complex way to write numeric_limits<intmax_t>::max().