http://llvm.org/bugs/show_bug.cgi?id=9969
Summary: Warn about missing parameters for ?: operator
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
http://www.viva64.com/en/d/0091/ seems to warn on this code:
int foo(int a, bool b, int c, int d) {
return a + b ? c : d;
}
In this case it's likely that the programmer really meant to write
int foo(int a, bool b, int c, int d) {
return a + (b ? c : d);
}
Maybe Clang should warn about 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