Add another test case for attribute(nonnull) checking.

llvm-svn: 60544
This commit is contained in:
Ted Kremenek 2008-12-04 18:35:53 +00:00
parent 471a654711
commit 3f0e5c88d9
1 changed files with 9 additions and 0 deletions

View File

@ -65,6 +65,15 @@ int f6(int *p) {
: bar(p, 0); // no-warning
}
int bar2(int* p, int q) __attribute__((nonnull(1)));
int f6b(int *p) {
return !p ? bar2(p, 1) // expected-warning {{Null pointer passed as an argument to a 'nonnull' parameter}}
: bar2(p, 0); // no-warning
}
int* qux();
int f7(int x) {