mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 05:26:07 +00:00

Addresses a conflict with glibc's __nonnull macro by renaming the type nullability qualifiers as follows: __nonnull -> _Nonnull __nullable -> _Nullable __null_unspecified -> _Null_unspecified This is the major part of rdar://problem/21530726, but does not yet provide the Darwin-specific behavior for the old names. llvm-svn: 240596
11 lines
367 B
Objective-C
11 lines
367 B
Objective-C
// RUN: %clang_cc1 -fobjc-arc -fsyntax-only -Woverriding-method-mismatch %s -verify
|
|
|
|
__attribute__((objc_root_class))
|
|
@interface NSFoo
|
|
@end
|
|
|
|
// ARC qualifiers stacked with nullability.
|
|
void accepts_arc_qualified(NSFoo * __unsafe_unretained _Nonnull obj) {
|
|
accepts_arc_qualified(0); // expected-warning{{null passed to a callee that requires a non-null argument}}
|
|
}
|