annotate clang/test/CodeCompletion/objc-protocol-member-access.m @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Note: the run lines follow their respective tests, since line/column
anatofuz
parents:
diff changeset
2 // matter in this test.
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @protocol Bar
anatofuz
parents:
diff changeset
5 @property (readonly) int bar;
anatofuz
parents:
diff changeset
6 @end
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 @protocol Foo <Bar>
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 @property (nonatomic, readonly) int foo;
anatofuz
parents:
diff changeset
11 - (void)foobar: (int)x;
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 @end
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 int getFoo(id object) {
anatofuz
parents:
diff changeset
16 id<Foo> modelObject = (id<Foo>)object;
anatofuz
parents:
diff changeset
17 int foo = modelObject.;
anatofuz
parents:
diff changeset
18 return foo;
anatofuz
parents:
diff changeset
19 }
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:17:25 %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
22 // CHECK: bar (InBase) : [#int#]bar
anatofuz
parents:
diff changeset
23 // CHECK: foo (InBase) : [#int#]foo
anatofuz
parents:
diff changeset
24 // CHECK-NOT: foobar