summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm15
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm b/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
index 805766b23bd..8740a4c279d 100644
--- a/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
+++ b/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple arm64e-apple-ios13.0 -debug-info-kind=standalone -fobjc-arc \
+// RUN: %clang_cc1 -triple arm64e-apple-ios13.0 -debug-info-kind=standalone -fobjc-arc -fsanitize=nullability-return \
// RUN: %s -emit-llvm -o - | FileCheck %s
@interface NSObject
@@ -10,16 +10,25 @@
// CHECK: define {{.*}}@"\01-[MyData setData:]"
// CHECK: [[DATA:%.*]] = alloca %struct.Data
-// CHECK: call %struct.Data* @_ZN4DataD1Ev(%struct.Data* [[DATA]]){{.*}}, !dbg [[LOC:![0-9]+]]
+// CHECK: call %struct.Data* @_ZN4DataD1Ev(%struct.Data* [[DATA]]){{.*}}, !dbg [[DATA_PROPERTY_LOC:![0-9]+]]
// CHECK-NEXT: ret void
-// [[LOC]] = !DILocation(line: 0
+// CHECK: define {{.*}}@"\01-[MyData string]"
+// CHECK: call void @__ubsan_handle_nullability_return_v1_abort{{.*}}, !dbg [[STRING_PROPERTY_LOC:![0-9]+]]
+// CHECK: ret
@interface MyData : NSObject
struct Data {
NSString *name;
};
+
+// CHECK-DAG: [[DATA_PROPERTY_LOC]] = !DILocation(line: [[@LINE+1]]
@property struct Data data;
+
+// CHECK-DAG: [[STRING_PROPERTY_LOC]] = !DILocation(line: [[@LINE+1]]
+@property (nonnull) NSString *string;
+
@end
+
@implementation MyData
@end
OpenPOWER on IntegriCloud