Add test case for PR 4759.

llvm-svn: 79954
This commit is contained in:
Ted Kremenek 2009-08-24 22:56:32 +00:00
parent e208c9458d
commit 6bc04bca68
1 changed files with 9 additions and 0 deletions

View File

@ -272,4 +272,13 @@ void f13() {
if (((((int) x) << 2) + 1) >> 1) *x = 1; // no-warning
}
// PR 4759 - Attribute non-null checking by the analyzer was not correctly
// handling pointer values that were undefined.
void pr4759_aux(int *p) __attribute__((nonnull));
void pr4759() {
int *p;
pr4759_aux(p); // expected-warning{{undefined}}
}