http://llvm.org/bugs/show_bug.cgi?id=13540

             Bug #: 13540
           Summary: clang should warn on comparing bools to integer
                    constants
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


eg on this:

bool f(bool b) {
  return b == 48;
}


use case: I had

   if (a == 4)

somewhere, then i moved that into a variable cond, and incompletely replaced my
condition with that like so:

  if (cond == 4)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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