Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | typedef int T; |
| 5 | void 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 Kyrtzidis | 2502efd | 2011-09-20 23:27:33 +0000 | [diff] [blame] | 14 | // RUN: -cursor-at=%s.h:5:5 \ |
| 15 | // RUN: -cursor-at=%s.h:5:14 \ |
Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 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 |
| 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 Kyrtzidis | 2502efd | 2011-09-20 23:27:33 +0000 | [diff] [blame] | 26 | // RUN: -cursor-at=%s.h:5:5 \ |
| 27 | // RUN: -cursor-at=%s.h:5:14 \ |
Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 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 |
| 32 | |
Argyrios Kyrtzidis | 2502efd | 2011-09-20 23:27:33 +0000 | [diff] [blame] | 33 | // From header |
Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 34 | // CHECK: macro definition=OBSCURE |
| 35 | // CHECK: macro definition=DECORATION |
| 36 | // CHECK: macro expansion=DECORATION:2:9 |
| 37 | // CHECK: macro expansion=OBSCURE:1:9 |
Argyrios Kyrtzidis | 2502efd | 2011-09-20 23:27:33 +0000 | [diff] [blame] | 38 | // CHECK: macro expansion=DECORATION:2:9 |
| 39 | |
| 40 | // From main file |
| 41 | // CHECK: macro expansion=OBSCURE:1:9 |
Argyrios Kyrtzidis | e24692b | 2011-09-15 18:02:56 +0000 | [diff] [blame] | 42 | // CHECK: macro expansion=OBSCURE:1:9 |
| 43 | // CHECK: macro expansion=DECORATION:2:9 |