aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-04 19:39:12 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-04 19:39:12 +0000
commit1e10011aa27d322d1290fc04d2372bf8719c645b (patch)
tree5415776475ca4b17596c23930a61d9d05c385ca4
parentf5e883474796afd26e52a010cd9bf90374fa1915 (diff)
Add another static analyzer test case involving attribute(nonnull).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60547 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/null-deref-ps.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index 3d912dcd08..806065342a 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -72,7 +72,12 @@ int f6b(int *p) {
: bar2(p, 0); // no-warning
}
+int bar3(int*p, int q, int *r) __attribute__((nonnull(1,3)));
+int f6c(int *p, int *q) {
+ return !p ? bar3(q, 2, p)
+ : bar3(p, 2, q);
+}
int* qux();