diff options
| author | Vedant Kumar <vsk@apple.com> | 2019-12-10 13:35:50 -0800 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2019-12-10 13:39:22 -0800 |
| commit | 3e1562e83339bb1e18fb36a5a2fc629c75f5f239 (patch) | |
| tree | 31e5150b9bc17971612778fa1cccda6e4030b224 /clang | |
| parent | 8bd9d0bff21b6732c122365de793de12fef9c681 (diff) | |
| download | bcm5719-llvm-3e1562e83339bb1e18fb36a5a2fc629c75f5f239.tar.gz bcm5719-llvm-3e1562e83339bb1e18fb36a5a2fc629c75f5f239.zip | |
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
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm | 15 |
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 |

