summaryrefslogtreecommitdiff
path: root/test/Sema/nonnull.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/nonnull.c')
-rw-r--r--test/Sema/nonnull.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/nonnull.c b/test/Sema/nonnull.c
index e98a8194dbeb..217bbb16df60 100644
--- a/test/Sema/nonnull.c
+++ b/test/Sema/nonnull.c
@@ -167,3 +167,10 @@ void returns_nonnull_warning_tests() {
int and_again = !returns_nonnull_whee(); // expected-warning {{nonnull function call 'returns_nonnull_whee()' will evaluate to 'true' on first encounter}}
and_again = !returns_nonnull_whee(); // expected-warning {{nonnull function call 'returns_nonnull_whee()' will evaluate to 'true' on first encounter}}
}
+
+void pr30828(char *p __attribute__((nonnull)));
+void pr30828(char *p) {}
+
+void call_pr30828() {
+ pr30828(0); // expected-warning {{null passed to a callee that requires a non-null argument}}
+}