llvm-project/clang/lib
Richard Trieu bb4b894e0b 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.

llvm-svn: 183688
2013-06-10 18:52:07 +00:00
..
ARCMigrate Cleanup handling of UniqueExternalLinkage. 2013-05-13 00:12:11 +00:00
AST Revert "[Sema] Make FunctionType's TSI use unadjusted argument types" 2013-06-08 18:19:52 +00:00
ASTMatchers Parser/Registry argument enhancements. 2013-06-04 15:46:22 +00:00
Analysis [analyzer; new edges] Simplify edges in a C++11 for-range loop. 2013-06-06 21:53:45 +00:00
Basic address some comments on r183474: 2013-06-07 22:29:12 +00:00
CodeGen [CodeGen] Make CGCleanup.h include what it now uses 2013-06-09 16:56:53 +00:00
Driver When we're compiling with -pg make sure to link with gcrt1.o on linux. Be 2013-06-07 23:25:01 +00:00
Edit [objcmt] Fix a mishandled conversion to objc directory literal. 2013-04-06 01:13:17 +00:00
Format Improved handling of escaped newlines at the token start. 2013-06-07 17:45:07 +00:00
Frontend Handle Unicode characters in fix-it replacement strings. 2013-06-07 17:16:01 +00:00
FrontendTool <rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file. 2013-03-27 16:47:18 +00:00
Headers Even in a modules world, people will depend on the weird xmmintrin.h -> emmintrin.h forwarding. 2013-06-07 22:49:44 +00:00
Lex [Preprocessor] Prevent expansion of y in x ## y when x is empty 2013-05-25 01:35:18 +00:00
Parse Fix the parser's updating of the template depth when parsing local templates and late-parsed templates. 2013-06-08 19:47:52 +00:00
Rewrite Added Lexer::getBufferEnd(). 2013-06-04 16:58:03 +00:00
Sema Add a new warning, -Wlogical-not-parentheses, to -Wparentheses. 2013-06-10 18:52:07 +00:00
Serialization Loosen r178109 even further, to assume that all redefined macros in system headers and system modules are equivalent. 2013-06-07 22:56:11 +00:00
StaticAnalyzer [analyzer] Minor fixups to r183062 2013-06-08 00:29:29 +00:00
Tooling ClangTool: strip -o from the command line 2013-06-06 11:52:19 +00:00
CMakeLists.txt Turn CLANG_ENABLE_{ARCMT,REWRITER,STATIC_ANALYZER} into proper options so that 2013-05-29 21:09:18 +00:00
Makefile Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user 2012-12-13 16:09:42 +00:00