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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to