// REQUIRES: asserts
// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -x objective-c -emit-llvm -triple x86_64-apple-macosx10.10.0 -fblocks -fobjc-arc -fsanitize=nullability-arg,nullability-assign,nullability-return -w %s -o - | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -x objective-c++ -emit-llvm -triple x86_64-apple-macosx10.10.0 -fblocks -fobjc-arc -fsanitize=nullability-arg,nullability-assign,nullability-return -w %s -o - | FileCheck %s
// CHECK: [[NONNULL_RV_LOC1:@.*]] = private unnamed_addr global {{.*}} i32 100, i32 6
// CHECK: [[NONNULL_ARG_LOC:@.*]] = private unnamed_addr global {{.*}} i32 204, i32 15 {{.*}} i32 190, i32 23
// CHECK: [[NONNULL_ASSIGN1_LOC:@.*]] = private unnamed_addr global {{.*}} i32 305, i32 9
// CHECK: [[NONNULL_ASSIGN2_LOC:@.*]] = private unnamed_addr global {{.*}} i32 405, i32 10
// CHECK: [[NONNULL_ASSIGN3_LOC:@.*]] = private unnamed_addr global {{.*}} i32 506, i32 10
// CHECK: [[NONNULL_INIT1_LOC:@.*]] = private unnamed_addr global {{.*}} i32 604, i32 25
// CHECK: [[NONNULL_INIT2_LOC1:@.*]] = private unnamed_addr global {{.*}} i32 707, i32 26
// CHECK: [[NONNULL_INIT2_LOC2:@.*]] = private unnamed_addr global {{.*}} i32 707, i32 29
// CHECK: [[NONNULL_RV_LOC2:@.*]] = private unnamed_addr global {{.*}} i32 800, i32 6
// CHECK-LABEL: define{{.*}} i32* @{{.*}}nonnull_retval1
int *_Nonnull
void
// CHECK-LABEL: define{{.*}} void @{{.*}}call_func_with_nonnull_arg
void
// CHECK-LABEL: define{{.*}} void @{{.*}}nonnull_assign1
void
// CHECK-LABEL: define{{.*}} void @{{.*}}nonnull_assign2
void
;
// CHECK-LABEL: define{{.*}} void @{{.*}}nonnull_assign3
void
// CHECK-LABEL: define{{.*}} void @{{.*}}nonnull_init1
void
// CHECK-LABEL: define{{.*}} void @{{.*}}nonnull_init2
void
// CHECK-LABEL: define{{.*}} i32* @{{.*}}nonnull_retval2
int *_Nonnull
// CHECK-LABEL: define{{.*}} void @{{.*}}call_A
void
void
/// Create a "NSObject * _Nonnull" instance.
NSObject *
NSObject *_Nullable
int