llvm/clang/test/SemaObjC/nullability-arc.m
Douglas Gregor aea7afdc13 Replace __double_underscored type nullability qualifiers with _Uppercase_underscored
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
2015-06-24 22:02:08 +00:00

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}}
}