History log of /external/clang/test/SemaCXX/warn-logical-not-compare.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
df88082fd50a0eb6ab2a4f21ed6c4df005700ec8 23-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Testcase for PR16673.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-logical-not-compare.cpp
14b7673b341c0c9edc719754b9c2faafac21fe36 04-Jul-2013 Richard Trieu <rtrieu@google.com> Improve -Wlogical-not-parentheses to catch when the not is applied to an enum.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-logical-not-compare.cpp
ef0e4e6eda13c2dcd6d4d43f1750d1d73202d16a 10-Jun-2013 Richard Trieu <rtrieu@google.com> Add a new warning, -Wlogical-not-parentheses, to -Wparentheses.

This warning triggers on the logical not of a non-boolean expression on the
left hand side of comparison. Often, the user meant to negate the comparison,
not just the left hand side of the comparison. Two notes are also emitted,
the first with a fix-it to add parentheses around the comparison, and the other
to put parenthesis around the not expression to silence the warning.

bool not_equal(int x, int y) {
return !x == y; // warn here
}

return !(x == y); // first fix-it, to negate comparison.

return (!x) == y; // second fix-it, to silence warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/warn-logical-not-compare.cpp