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

           Summary: Warn on identical subexpressions to the left and right
                    of ||, &&
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


http://www.viva64.com/ru/pvs-studio/ seems to warn on this code:

void f() {
  int a0 = 0, a1 = 1;
  if (a0 == 0 || a0 == 0)
    a1 = 2;
}

It says something along the lines of "There are identical sub-expressions to
the left and to the right of the '||' operator."

Can / should clang do this, too?

-- 
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