[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / getcursor-pp-pch.c
blobd68384c660678c32e9b6f8786984db9b5f3d4706
4 typedef int T;
5 void OBSCURE(func)(int x) {
6 OBSCURE(T) DECORATION value;
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 \
14 // RUN: -cursor-at=%s.h:5:5 \
15 // RUN: -cursor-at=%s.h:5:14 \
16 // 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
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 \
26 // RUN: -cursor-at=%s.h:5:5 \
27 // RUN: -cursor-at=%s.h:5:14 \
28 // 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
33 // From header
34 // CHECK: macro definition=OBSCURE
35 // CHECK: macro definition=DECORATION
36 // CHECK: macro expansion=DECORATION:2:9
37 // CHECK: macro expansion=OBSCURE:1:9
38 // CHECK: macro expansion=DECORATION:2:9
40 // From main file
41 // CHECK: macro expansion=OBSCURE:1:9
42 // CHECK: macro expansion=OBSCURE:1:9
43 // CHECK: macro expansion=DECORATION:2:9