]> granicus.if.org Git - clang/commit
Broaden -Wstring-conversion to catch string literals in logical or expressions.
authorRichard Trieu <rtrieu@google.com>
Sat, 25 Jan 2014 01:10:35 +0000 (01:10 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 25 Jan 2014 01:10:35 +0000 (01:10 +0000)
commitc8a38fbc6ba95fd9bd47550b0a162e71451b20b9
tree09f81d7d844a2fb27cc4fddb76dbe1e56f1713bc
parent0d05ab46c656ba334bdded25ff100aa083ceee99
Broaden -Wstring-conversion to catch string literals in logical or expressions.
Previously, string literals were ignored in all logical expressions.  This
reduces it to only ignore in logical and expressions.

assert(0 && "error"); // No warning
assert(0 || "error"); // Warn

Fixes PR17565

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/SemaCXX/warn-string-conversion.cpp