http://llvm.org/bugs/show_bug.cgi?id=5190
Summary: missing warnings on switch(boolean_expr)
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: ASSIGNED
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Clang should warn on switch(bool) since it's almost certainly wrong
(developers seem okay with using if-statements instead).
int test2(const char *foo) {
int success = 0;
switch (foo && foo[0]) { /* XXX */
case 0:
success = 1;
break;
case 1:
break;
}
return success;
}
--
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