[clang] 3e1562e - Debug Info: Strengthen the synthesized-property-cleanup.mm test, NFC

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 10 13:39:50 PST 2019


Author: Vedant Kumar
Date: 2019-12-10T13:39:22-08:00
New Revision: 3e1562e83339bb1e18fb36a5a2fc629c75f5f239

URL: https://github.com/llvm/llvm-project/commit/3e1562e83339bb1e18fb36a5a2fc629c75f5f239
DIFF: https://github.com/llvm/llvm-project/commit/3e1562e83339bb1e18fb36a5a2fc629c75f5f239.diff

LOG: Debug Info: Strengthen the synthesized-property-cleanup.mm test, NFC

After https://reviews.llvm.org/D71084, the line locations assigned when
emitting cleanups inside of property accessors changed. Update this test
to actually check that those locations are correct.

rdar://57796656

Added: 
    

Modified: 
    clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm b/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
index 805766b23bdb..8740a4c279d7 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 @@ @interface NSString : NSObject
 
 // 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]]
+ at property (nonnull) NSString *string;
+
 @end
+
 @implementation MyData
 @end


        


More information about the cfe-commits mailing list