annotate clang/test/Index/complete-preprocessor.m @ 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 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // The line and column layout of this test is significant. Run lines
anatofuz
parents:
diff changeset
2 // are at the end.
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 #if 1
anatofuz
parents:
diff changeset
5 #endif
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 #define FOO(a, b) a##b
anatofuz
parents:
diff changeset
8 #define BAR
anatofuz
parents:
diff changeset
9 #ifdef FOO
anatofuz
parents:
diff changeset
10 #endif
anatofuz
parents:
diff changeset
11 #if defined(FOO)
anatofuz
parents:
diff changeset
12 #endif
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 FOO(in,t) value;
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 // RUN: c-index-test -code-completion-at=%s:4:3 %s | FileCheck -check-prefix=CHECK-CC1 %s
anatofuz
parents:
diff changeset
17 // CHECK-CC1: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
18 // CHECK-CC1-NEXT: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro}{LeftParen (}{Placeholder args}{RightParen )} (40)
anatofuz
parents:
diff changeset
19 // CHECK-CC1-NEXT: NotImplemented:{TypedText error}{HorizontalSpace }{Placeholder message} (40)
anatofuz
parents:
diff changeset
20 // CHECK-CC1-NEXT: NotImplemented:{TypedText if}{HorizontalSpace }{Placeholder condition} (40)
anatofuz
parents:
diff changeset
21 // CHECK-CC1-NEXT: NotImplemented:{TypedText ifdef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
22 // CHECK-CC1-NEXT: NotImplemented:{TypedText ifndef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
23 // CHECK-CC1-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
24 // CHECK-CC1-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
25 // CHECK-CC1-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
26 // CHECK-CC1-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
27 // CHECK-CC1-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
28 // CHECK-CC1-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
29 // CHECK-CC1-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number} (40)
anatofuz
parents:
diff changeset
30 // CHECK-CC1-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number}{HorizontalSpace }{Text "}{Placeholder filename}{Text "} (40)
anatofuz
parents:
diff changeset
31 // CHECK-CC1-NEXT: NotImplemented:{TypedText pragma}{HorizontalSpace }{Placeholder arguments} (40)
anatofuz
parents:
diff changeset
32 // CHECK-CC1-NEXT: NotImplemented:{TypedText undef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
33 // CHECK-CC1-NEXT: NotImplemented:{TypedText warning}{HorizontalSpace }{Placeholder message} (40)
anatofuz
parents:
diff changeset
34 // RUN: c-index-test -code-completion-at=%s:5:2 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
35 // CHECK-CC2: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
36 // CHECK-CC2-NEXT: NotImplemented:{TypedText define}{HorizontalSpace }{Placeholder macro}{LeftParen (}{Placeholder args}{RightParen )} (40)
anatofuz
parents:
diff changeset
37 // CHECK-CC2-NEXT: NotImplemented:{TypedText elif}{HorizontalSpace }{Placeholder condition} (40)
anatofuz
parents:
diff changeset
38 // CHECK-CC2-NEXT: NotImplemented:{TypedText else} (40)
anatofuz
parents:
diff changeset
39 // CHECK-CC2-NEXT: NotImplemented:{TypedText endif} (40)
anatofuz
parents:
diff changeset
40 // CHECK-CC2-NEXT: NotImplemented:{TypedText error}{HorizontalSpace }{Placeholder message} (40)
anatofuz
parents:
diff changeset
41 // CHECK-CC2-NEXT: NotImplemented:{TypedText if}{HorizontalSpace }{Placeholder condition} (40)
anatofuz
parents:
diff changeset
42 // CHECK-CC2-NEXT: NotImplemented:{TypedText ifdef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
43 // CHECK-CC2-NEXT: NotImplemented:{TypedText ifndef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
44 // CHECK-CC2-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
45 // CHECK-CC2-NEXT: NotImplemented:{TypedText import}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
46 // CHECK-CC2-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
47 // CHECK-CC2-NEXT: NotImplemented:{TypedText include}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
48 // CHECK-CC2-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text "}{Placeholder header}{Text "} (40)
anatofuz
parents:
diff changeset
49 // CHECK-CC2-NEXT: NotImplemented:{TypedText include_next}{HorizontalSpace }{Text <}{Placeholder header}{Text >} (40)
anatofuz
parents:
diff changeset
50 // CHECK-CC2-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number} (40)
anatofuz
parents:
diff changeset
51 // CHECK-CC2-NEXT: NotImplemented:{TypedText line}{HorizontalSpace }{Placeholder number}{HorizontalSpace }{Text "}{Placeholder filename}{Text "} (40)
anatofuz
parents:
diff changeset
52 // CHECK-CC2-NEXT: NotImplemented:{TypedText pragma}{HorizontalSpace }{Placeholder arguments} (40)
anatofuz
parents:
diff changeset
53 // CHECK-CC2-NEXT: NotImplemented:{TypedText undef}{HorizontalSpace }{Placeholder macro} (40)
anatofuz
parents:
diff changeset
54 // CHECK-CC2-NEXT: NotImplemented:{TypedText warning}{HorizontalSpace }{Placeholder message} (40)
anatofuz
parents:
diff changeset
55 // RUN: c-index-test -code-completion-at=%s:9:8 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
56 // CHECK-CC3: macro definition:{TypedText BAR} (40)
anatofuz
parents:
diff changeset
57 // CHECK-CC3: macro definition:{TypedText FOO} (40)
anatofuz
parents:
diff changeset
58 // RUN: c-index-test -code-completion-at=%s:11:13 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
59 // RUN: c-index-test -code-completion-at=%s:11:14 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
60 // RUN: c-index-test -code-completion-at=%s:11:5 %s | FileCheck -check-prefix=CHECK-CC4 %s
anatofuz
parents:
diff changeset
61 // CHECK-CC4: macro definition:{TypedText BAR} (70)
anatofuz
parents:
diff changeset
62 // CHECK-CC4: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70)
anatofuz
parents:
diff changeset
63 // RUN: c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC5 %s
anatofuz
parents:
diff changeset
64 // CHECK-CC5: NotImplemented:{TypedText const} (50)
anatofuz
parents:
diff changeset
65 // CHECK-CC5: NotImplemented:{TypedText double} (50)
anatofuz
parents:
diff changeset
66 // CHECK-CC5: NotImplemented:{TypedText enum} (50)
anatofuz
parents:
diff changeset
67 // CHECK-CC5: NotImplemented:{TypedText extern} (40)
anatofuz
parents:
diff changeset
68 // CHECK-CC5: NotImplemented:{TypedText float} (50)
anatofuz
parents:
diff changeset
69 // CHECK-CC5: macro definition:{TypedText FOO}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (70)
anatofuz
parents:
diff changeset
70 // CHECK-CC5: TypedefDecl:{TypedText id} (50)
anatofuz
parents:
diff changeset
71 // CHECK-CC5: NotImplemented:{TypedText inline} (40)
anatofuz
parents:
diff changeset
72 // CHECK-CC5: NotImplemented:{TypedText int} (50)
anatofuz
parents:
diff changeset
73 // CHECK-CC5: NotImplemented:{TypedText long} (50)
anatofuz
parents:
diff changeset
74
anatofuz
parents:
diff changeset
75 // Same tests as above, but with completion caching.
anatofuz
parents:
diff changeset
76 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:4:2 %s | FileCheck -check-prefix=CHECK-CC1 %s
anatofuz
parents:
diff changeset
77 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:5:2 %s | FileCheck -check-prefix=CHECK-CC2 %s
anatofuz
parents:
diff changeset
78 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:9:8 %s | FileCheck -check-prefix=CHECK-CC3 %s
anatofuz
parents:
diff changeset
79 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:11:5 %s | FileCheck -check-prefix=CHECK-CC4 %s
anatofuz
parents:
diff changeset
80 // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:5 %s | FileCheck -check-prefix=CHECK-CC5 %s