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