Douglas Gregor | 0396f46 | 2010-03-19 05:22:59 +0000 | [diff] [blame^] | 1 | #define OBSCURE(X) X |
| 2 | #define DECORATION |
| 3 | |
| 4 | typedef int T; |
| 5 | void OBSCURE(func)(int x) { |
| 6 | OBSCURE(T) DECORATION value; |
| 7 | } |
| 8 | |
| 9 | // RUN: c-index-test -cursor-at=%s:1:11 %s | FileCheck -check-prefix=CHECK-1 %s |
| 10 | // CHECK-1: macro definition=OBSCURE |
| 11 | // RUN: c-index-test -cursor-at=%s:2:14 %s | FileCheck -check-prefix=CHECK-2 %s |
| 12 | // CHECK-2: macro definition=DECORATION |
| 13 | // RUN: c-index-test -cursor-at=%s:5:7 %s | FileCheck -check-prefix=CHECK-3 %s |
| 14 | // CHECK-3: macro instantiation=OBSCURE:1:9 |
| 15 | // RUN: c-index-test -cursor-at=%s:6:6 %s | FileCheck -check-prefix=CHECK-4 %s |
| 16 | // CHECK-4: macro instantiation=OBSCURE:1:9 |
| 17 | // RUN: c-index-test -cursor-at=%s:6:19 %s | FileCheck -check-prefix=CHECK-5 %s |
| 18 | // CHECK-5: macro instantiation=DECORATION:2:9 |