[LLVMbugs] [Bug 17565] New: Warn on conditions made trivially true due to string constant to bool conversion
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Oct 13 18:29:59 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17565
Bug ID: 17565
Summary: Warn on conditions made trivially true due to string
constant to bool conversion
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: david.majnemer at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Consider:
assert(cond != 0 || "Cond shouldn't be zero!");
What the user intended to write was:
assert(cond != 0 && "Cond shouldn't be zero!");
An example of this bug was found in LLVM itself and fixed in r192564.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131014/96d7b129/attachment.html>
More information about the llvm-bugs
mailing list