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. llvm-svn: 86242
Loading
Please register or sign in to comment