Fix failing test case found by bots:
authorAaron Ballman <aaron@aaronballman.com>
Fri, 15 Apr 2022 13:19:25 +0000 (09:19 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 15 Apr 2022 13:20:16 +0000 (09:20 -0400)
https://lab.llvm.org/buildbot#builders/109/builds/36683
https://lab.llvm.org/buildbot#builders/164/builds/15456
(and others)

clang/test/SemaObjC/nonnull.m

index 303a201..3b087b0 100644 (file)
@@ -41,10 +41,8 @@ foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)())
   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