[cfe-dev] uncovered path (wrong constraint?)
YuvalShahar
yuval.shahar.007 at gmail.com
Mon Apr 15 00:11:29 PDT 2013
I clang the following code, but the expected warning is missing.
Could it be that i is being constrained to zero, and this constraint is not
being removed by the while statement?
void use(int);
void checkchecker(char *s) {
int i=0;
int j;
while(*s!=0) {
i++;
}
if(i>0) {
use(j); // expected warning: Function call argument is an uninitialized
value
}
}
If I change the if-predicate to "i==0", the warning is being reported.
Thanks, Yuval.
--
View this message in context: http://clang-developers.42468.n3.nabble.com/uncovered-path-wrong-constraint-tp4031492.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list