blob: 7d56523ce49358bdce6031a04dad7565ea4c22a3 [file] [log] [blame]
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +00001// Test without PCH
Michael Gottesman7cf0cd32012-10-01 23:39:44 +00002// RUN: c-index-test -test-annotate-tokens=%S/annotate-macro-args.h:9:1:10:1 %s -include %S/annotate-macro-args.h | FileCheck -check-prefix=CHECK1 %s
3// RUN: c-index-test -test-annotate-tokens=%S/annotate-macro-args.h:15:1:16:1 %s -include %S/annotate-macro-args.h | FileCheck -check-prefix=CHECK2 %s
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +00004
5// Test with PCH
NAKAMURA Takumid6250562012-10-02 00:11:53 +00006// RUN: c-index-test -write-pch %t.pch -x objective-c-header %S/annotate-macro-args.h -Xclang -detailed-preprocessing-record
7// RUN: c-index-test -test-annotate-tokens=%S/annotate-macro-args.h:9:1:10:1 %s -include-pch %t.pch | FileCheck -check-prefix=CHECK1 %s
8// RUN: c-index-test -test-annotate-tokens=%S/annotate-macro-args.h:15:1:16:1 %s -include-pch %t.pch | FileCheck -check-prefix=CHECK2 %s
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +00009
10// CHECK1: Identifier: "MACRO" [9:3 - 9:8] macro expansion=MACRO:6:9
11// CHECK1: Punctuation: "(" [9:8 - 9:9]
Argyrios Kyrtzidisccc6f362012-03-23 03:33:19 +000012// CHECK1: Punctuation: "[" [9:9 - 9:10] ObjCMessageExpr=meth:2:8
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +000013// CHECK1: Identifier: "MyClass" [9:10 - 9:17] ObjCClassRef=MyClass:1:12
Argyrios Kyrtzidisccc6f362012-03-23 03:33:19 +000014// CHECK1: Identifier: "meth" [9:18 - 9:22] ObjCMessageExpr=meth:2:8
15// CHECK1: Punctuation: "]" [9:22 - 9:23] ObjCMessageExpr=meth:2:8
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +000016// CHECK1: Punctuation: ")" [9:23 - 9:24]
17
18// CHECK2: Identifier: "INVOKE" [15:3 - 15:9] macro expansion=INVOKE:12:9
19// CHECK2: Punctuation: "(" [15:9 - 15:10]
Argyrios Kyrtzidisccc6f362012-03-23 03:33:19 +000020// CHECK2: Identifier: "meth" [15:10 - 15:14] ObjCMessageExpr=meth:2:8
Argyrios Kyrtzidisa6763792011-08-18 18:03:34 +000021// CHECK2: Punctuation: "," [15:14 - 15:15]
22// CHECK2: Identifier: "MyClass" [15:16 - 15:23] ObjCClassRef=MyClass:1:12
23// CHECK2: Punctuation: ")" [15:23 - 15:24]