| commit | 021baa373f58a21a3e2169c2f22f7dc58a987e96 | [log] [tgz] |
|---|---|---|
| author | Richard Trieu <rtrieu@google.com> | Fri Sep 23 20:10:00 2011 +0000 |
| committer | Richard Trieu <rtrieu@google.com> | Fri Sep 23 20:10:00 2011 +0000 |
| tree | b470e17430a8811dfb0e012a8e11630906a3ad37 | |
| parent | 0c254a00c1c7e64ca26de4e6f8a0d13510a8b1aa [diff] |
Add a new warning to -Wliteral-conversion to catch cases where a string literal
is cast to a boolean. An exception has been made for string literals in
logical expressions to allow the common case of use in assert statements.
bool x;
x = "hi"; // Warn here
void foo(bool x);
foo("hi"); // Warn here
assert(0 && "error");
assert("error); // Warn here
llvm-svn: 140405