r141345 also fixed a -Wuninitialized bug where loop conditions were not always flagged as being uninitialized. Addresses <rdar://problem/9432305>.

llvm-svn: 141346
This commit is contained in:
Ted Kremenek 2011-10-07 00:52:56 +00:00
parent f8fd4d4962
commit 171969c8c2
1 changed files with 6 additions and 0 deletions

View File

@ -404,4 +404,10 @@ void PR11069(int a, int b) {
}
}
// Test uninitialized value used in loop condition.
void rdar9432305(float *P) {
int i; // expected-note {{initialize the variable 'i' to silence this warning}}
for (; i < 10000; ++i) // expected-warning {{variable 'i' is uninitialized when used here}}
P[i] = 0.0f;
}