diff clang/test/CodeGenObjC/debug-info-property-class-instance-same-name.m @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/clang/test/CodeGenObjC/debug-info-property-class-instance-same-name.m	Tue Jun 15 19:15:29 2021 +0900
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
+
+// Both properties should be emitted as having a class and an instance property
+// with the same name is allowed.
+@interface I1
+// CHECK: !DIObjCProperty(name: "p1"
+// CHECK-SAME:            line: [[@LINE+1]]
+@property int p1;
+// CHECK: !DIObjCProperty(name: "p1"
+// CHECK-SAME:            line: [[@LINE+1]]
+@property(class) int p1;
+@end
+
+@implementation I1
+@synthesize p1;
+@end
+
+void foo(I1 *iptr) {}