summaryrefslogtreecommitdiffstats
path: root/test/Index/cursor-dynamic-call.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/cursor-dynamic-call.mm')
-rw-r--r--test/Index/cursor-dynamic-call.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Index/cursor-dynamic-call.mm b/test/Index/cursor-dynamic-call.mm
index ac9e6d3..a926c3d 100644
--- a/test/Index/cursor-dynamic-call.mm
+++ b/test/Index/cursor-dynamic-call.mm
@@ -37,6 +37,18 @@ void foo(SS *ss, IS* is, Class cls) {
[cls ClsMeth];
}
+@interface NSObject
++(id)alloc;
+-(id)init;
+@end
+
+@interface Test : NSObject
+@end
+
+void test2() {
+ id o = [[Test alloc] init];
+}
+
// RUN: c-index-test -cursor-at=%s:8:11 \
// RUN: -cursor-at=%s:9:11 \
// RUN: -cursor-at=%s:25:11 \
@@ -46,6 +58,7 @@ void foo(SS *ss, IS* is, Class cls) {
// RUN: -cursor-at=%s:35:9 \
// RUN: -cursor-at=%s:36:9 \
// RUN: -cursor-at=%s:37:9 \
+// RUN: -cursor-at=%s:49:26 \
// RUN: %s | FileCheck %s
// CHECK: 8:11 MemberRefExpr=meth:3:16 {{.*}} Dynamic-call
@@ -59,3 +72,4 @@ void foo(SS *ss, IS* is, Class cls) {
// CHECK-NOT: 36:3 {{.*}} Dynamic-call
// CHECK: 36:3 {{.*}} Receiver-type=ObjCInterface
// CHECK: 37:3 ObjCMessageExpr=ClsMeth:15:8 {{.*}} Dynamic-call Receiver-type=ObjCClass
+// CHECK-NOT: 49:10 {{.*}} Dynamic-call
OpenPOWER on IntegriCloud