Fix failing test case found by bots:

https://lab.llvm.org/buildbot#builders/109/builds/36683
https://lab.llvm.org/buildbot#builders/164/builds/15456
(and others)
This commit is contained in:
Aaron Ballman 2022-04-15 09:19:25 -04:00
parent 0b09b5d448
commit 57a4f9bd49
1 changed files with 2 additions and 4 deletions

View 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