aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ReturnPointerRangeChecker.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-06 08:49:08 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-06 08:49:08 +0000
commit5dbad3d46c43e8051dac0c3775bcbaf8f1a6b8fe (patch)
tree1db2e008ab573ba1f0bc372e8e868b1abd922c9f /lib/Analysis/ReturnPointerRangeChecker.cpp
parent4c2620705b87ab6899fb2756bf191bb89d1995c8 (diff)
Improve the -Wsign-compare heuristics:
* If the unsigned type is smaller than the signed type, never warn, because its value will not change when zero-extended to the larger type. * If we're testing for (in)equality, and the unsigned value is an integer constant whose sign bit is not set, never warn, because even though the signed value might change, it can't affect the result of the equality. Also make the comparison test cases much more rigorous, and have them expose the subtle differences between C and C++ here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ReturnPointerRangeChecker.cpp')
0 files changed, 0 insertions, 0 deletions