Added test case to exercise this fix when checking for uses of uninitialized values.
Patch by Zhongxing Xu!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51377
91177308-0d34-0410-b5e6-
96231b3b80d8
if (asLVal)
MakeNode(Dst, U, *I, SetRVal(St, U, location));
else
- EvalLoad(Dst, Ex, *I, St, location);
+ EvalLoad(Dst, U, *I, St, location);
}
return;
return ((x+1)+2+((x))) + 1 ? 1 : 2; // expected-warning{{Branch}}
}
+int f3(void) {
+ int i;
+ int *p = &i;
+ if (*p > 0) // expected-warning{{Branch condition evaluates to an uninitialized value}}
+ return 0;
+ else
+ return 1;
+}