[cfe-commits] [PATCH] Improve -Wtautological-constant-out-of-range-compare

Eli Friedman eli.friedman at gmail.com
Tue Nov 13 18:27:25 PST 2012


+  // Common signed, other unsigned, constant unsigned
+  // Should not be possible as the common type should also be unsigned.

"(unsigned char)x < (unsigned short)256"?  (The common type is "int".)

-Eli

On Tue, Nov 13, 2012 at 6:24 PM, Richard Trieu <rtrieu at google.com> wrote:
>   Turned off warnings in analysis tests.  Enable the warning on enums again.  Added more tests.
>
> http://llvm-reviews.chandlerc.com/D113
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D113?vs=302&id=320#toc
>
> Files:
>   test/Analysis/additive-folding.cpp
>   test/SemaCXX/compare.cpp
>   lib/Sema/SemaChecking.cpp



More information about the cfe-commits mailing list