https://llvm.org/bugs/show_bug.cgi?id=26889
Bug ID: 26889 Summary: clang doesn't warn about duplicated conditions Product: clang Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: ahata...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified clang should warn that condition “a == 2” is duplicated in the following if-else-if chain: int g1; void foo1(int a) { if (a == 2) g1 = 32; else if (a == 3) g1 += 23; else if (a == 2) g1 -= 123; } gcc6 added a command line option -Wduplicated-cond to catch this. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs