[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)
Congcong Cai via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 06:24:50 PST 2024
HerrCai0907 wrote:
IMO, we should move this check to bugprone and provide 3 level's error.
1. really implement defined behavior -> The above example about float to unsigned
2. standard implement defined behavior but at least gcc and clang in each target has same behavior
3. most strictly check according to cppcodingguideline.
For the first level, we emit warning for explicit and implicit cast.
For the other level, we emit warning only for implicit cast.
WDYT? @5chmidti @carlosgalvezp
https://github.com/llvm/llvm-project/pull/116591
More information about the cfe-commits
mailing list