diff --git a/clang/test/SemaObjC/nonnull.m b/clang/test/SemaObjC/nonnull.m index 303a201f48618d..3b087b096d8f9e 100644 --- a/clang/test/SemaObjC/nonnull.m +++ b/clang/test/SemaObjC/nonnull.m @@ -41,10 +41,8 @@ extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1) func4(0, cp1); // expected-warning {{null passed to a callee that requires a non-null argument}} func4(cp1, 0); // expected-warning {{null passed to a callee that requires a non-null argument}} - // Shouldn't these emit warnings? Clang doesn't, and neither does GCC. It - // seems that the checking should handle Objective-C pointers. - func6((NSObject*) 0); // no-warning - func7((NSObject*) 0); // no-warning + func6((NSObject*) 0); // expected-warning {{passing arguments to 'func6' without a prototype is deprecated in all versions of C and is not supported in C2x}} + func7((NSObject*) 0); // expected-warning {{passing arguments to 'func7' without a prototype is deprecated in all versions of C and is not supported in C2x}} } void func5(int) NONNULL_ATTR; // no warning