clang -Wconstant-conversion conditional operator false positive #64741
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
duplicate
Resolved as duplicate
false-positive
Warning fires when it should not
The following C source code:
Produces the following warning when compiled with Clang:
0 ? 9223372036854775807L : 2147483647
evaluates to2147483647L
, so this warning is incorrect. GCC's similar-Woverflow
doesn't trigger for this test case.The text was updated successfully, but these errors were encountered: