Added more test cases for uninitialized values checker.
llvm-svn: 44307
This commit is contained in:
parent
2e04d73d83
commit
0d20033c6a
|
@ -27,3 +27,18 @@ int f5() {
|
|||
int a;
|
||||
a = 30; // no-warning
|
||||
}
|
||||
|
||||
void f6(int i) {
|
||||
int x;
|
||||
for (i = 0 ; i < 10; i++)
|
||||
printf("%d",x++); // expected-warning {use of uninitialized variable}
|
||||
}
|
||||
|
||||
void f7(int i) {
|
||||
int x = i;
|
||||
int y;
|
||||
for (i = 0; i < 10; i++ ) {
|
||||
printf("%d",x++); // no-warning
|
||||
x += y; // expected-warning {use of uninitialized variable}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue