annotate clang/test/Index/complete-arrow-dot.cpp @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 struct X {
anatofuz
parents:
diff changeset
2 void doSomething();
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 int field;
anatofuz
parents:
diff changeset
5 };
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 void X::doSomething() {
anatofuz
parents:
diff changeset
8 // RUN: c-index-test -code-completion-at=%s:10:8 %s | FileCheck %s
anatofuz
parents:
diff changeset
9 // RUN: env CINDEXTEST_COMPLETION_INCLUDE_FIXITS=1 c-index-test -code-completion-at=%s:10:8 %s | FileCheck -check-prefix=CHECK-WITH-CORRECTION %s
anatofuz
parents:
diff changeset
10 this.;
anatofuz
parents:
diff changeset
11 }
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 void doSomething() {
anatofuz
parents:
diff changeset
14 // RUN: c-index-test -code-completion-at=%s:17:6 %s | FileCheck -check-prefix=CHECK-ARROW-TO-DOT %s
anatofuz
parents:
diff changeset
15 // RUN: env CINDEXTEST_COMPLETION_INCLUDE_FIXITS=1 c-index-test -code-completion-at=%s:17:6 %s | FileCheck -check-prefix=CHECK-ARROW-TO-DOT-WITH-CORRECTION %s
anatofuz
parents:
diff changeset
16 X x;
anatofuz
parents:
diff changeset
17 x->
anatofuz
parents:
diff changeset
18 }
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 // CHECK-NOT: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
21 // CHECK-NOT: FieldDecl:{ResultType int}{TypedText field} (35) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
22 // CHECK-NOT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
23 // CHECK-NOT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder X &&}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
24 // CHECK-NOT: StructDecl:{TypedText X}{Text ::} (75) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
25 // CHECK-NOT: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
26 // CHECK: Completion contexts:
anatofuz
parents:
diff changeset
27 // CHECK-NEXT: Dot member access
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 // CHECK-WITH-CORRECTION: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
30 // CHECK-WITH-CORRECTION-NEXT: FieldDecl:{ResultType int}{TypedText field} (35) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
31 // CHECK-WITH-CORRECTION-NEXT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
32 // CHECK-WITH-CORRECTION-NEXT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder X &&}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
33 // CHECK-WITH-CORRECTION-NEXT: StructDecl:{TypedText X}{Text ::} (75) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
34 // CHECK-WITH-CORRECTION-NEXT: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
35 // CHECK-WITH-CORRECTION-NEXT: Completion contexts:
anatofuz
parents:
diff changeset
36 // CHECK-WITH-CORRECTION-NEXT: Dot member access
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 // CHECK-ARROW-TO-DOT-NOT: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
39 // CHECK-ARROW-TO-DOT-NOT: FieldDecl:{ResultType int}{TypedText field} (35) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
40 // CHECK-ARROW-TO-DOT-NOT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
41 // CHECK-ARROW-TO-DOT-NOT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder X &&}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
42 // CHECK-ARROW-TO-DOT-NOT: StructDecl:{TypedText X}{Text ::} (75) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
43 // CHECK-ARROW-TO-DOT-NOT: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
44 // CHECK-ARROW-TO-DOT: Completion contexts:
anatofuz
parents:
diff changeset
45 // CHECK-ARROW-TO-DOT-NEXT: Unknown
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 // CHECK-ARROW-TO-DOT-WITH-CORRECTION: CXXMethod:{ResultType void}{TypedText doSomething}{LeftParen (}{RightParen )} (34) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
48 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: FieldDecl:{ResultType int}{TypedText field} (35) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
49 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder const X &}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
50 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: CXXMethod:{ResultType X &}{TypedText operator=}{LeftParen (}{Placeholder X &&}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
51 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: StructDecl:{TypedText X}{Text ::} (75) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
52 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: CXXDestructor:{ResultType void}{TypedText ~X}{LeftParen (}{RightParen )} (79) (requires fix-it:{{.*}}
anatofuz
parents:
diff changeset
53 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: Completion contexts:
anatofuz
parents:
diff changeset
54 // CHECK-ARROW-TO-DOT-WITH-CORRECTION-NEXT: Arrow member access