blob: d68384c660678c32e9b6f8786984db9b5f3d4706 [file] [log] [blame]
Argyrios Kyrtzidise24692b2011-09-15 18:02:56 +00001
2
3
4typedef int T;
5void OBSCURE(func)(int x) {
6 OBSCURE(T) DECORATION value;
7}
8
9
10// Without PCH
11// RUN: c-index-test -cursor-at=%s.h:1:11 \
12// RUN: -cursor-at=%s.h:2:14 \
13// RUN: -cursor-at=%s.h:4:5 \
Argyrios Kyrtzidis2502efd2011-09-20 23:27:33 +000014// RUN: -cursor-at=%s.h:5:5 \
15// RUN: -cursor-at=%s.h:5:14 \
Argyrios Kyrtzidise24692b2011-09-15 18:02:56 +000016// RUN: -cursor-at=%s:5:7 \
17// RUN: -cursor-at=%s:6:6 \
18// RUN: -cursor-at=%s:6:19 \
19// RUN: -include %s.h %s | FileCheck %s
20
21// With PCH
22// RUN: c-index-test -write-pch %t.h.pch %s.h -Xclang -detailed-preprocessing-record
23// RUN: c-index-test -cursor-at=%s.h:1:11 \
24// RUN: -cursor-at=%s.h:2:14 \
25// RUN: -cursor-at=%s.h:4:5 \
Argyrios Kyrtzidis2502efd2011-09-20 23:27:33 +000026// RUN: -cursor-at=%s.h:5:5 \
27// RUN: -cursor-at=%s.h:5:14 \
Argyrios Kyrtzidise24692b2011-09-15 18:02:56 +000028// RUN: -cursor-at=%s:5:7 \
29// RUN: -cursor-at=%s:6:6 \
30// RUN: -cursor-at=%s:6:19 \
31// RUN: -include %t.h %s | FileCheck %s
32
Argyrios Kyrtzidis2502efd2011-09-20 23:27:33 +000033// From header
Argyrios Kyrtzidise24692b2011-09-15 18:02:56 +000034// CHECK: macro definition=OBSCURE
35// CHECK: macro definition=DECORATION
36// CHECK: macro expansion=DECORATION:2:9
37// CHECK: macro expansion=OBSCURE:1:9
Argyrios Kyrtzidis2502efd2011-09-20 23:27:33 +000038// CHECK: macro expansion=DECORATION:2:9
39
40// From main file
41// CHECK: macro expansion=OBSCURE:1:9
Argyrios Kyrtzidise24692b2011-09-15 18:02:56 +000042// CHECK: macro expansion=OBSCURE:1:9
43// CHECK: macro expansion=DECORATION:2:9