1*f4a2713aSLionel Sambuc 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc typedef int T; OBSCURE(func)5*f4a2713aSLionel Sambucvoid OBSCURE(func)(int x) { 6*f4a2713aSLionel Sambuc OBSCURE(T) DECORATION value; 7*f4a2713aSLionel Sambuc } 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc // Without PCH 11*f4a2713aSLionel Sambuc // RUN: c-index-test -cursor-at=%s.h:1:11 \ 12*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:2:14 \ 13*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:4:5 \ 14*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:5:5 \ 15*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:5:14 \ 16*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:5:7 \ 17*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:6:6 \ 18*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:6:19 \ 19*f4a2713aSLionel Sambuc // RUN: -include %s.h %s | FileCheck %s 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc // With PCH 22*f4a2713aSLionel Sambuc // RUN: c-index-test -write-pch %t.h.pch %s.h -Xclang -detailed-preprocessing-record 23*f4a2713aSLionel Sambuc // RUN: c-index-test -cursor-at=%s.h:1:11 \ 24*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:2:14 \ 25*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:4:5 \ 26*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:5:5 \ 27*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s.h:5:14 \ 28*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:5:7 \ 29*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:6:6 \ 30*f4a2713aSLionel Sambuc // RUN: -cursor-at=%s:6:19 \ 31*f4a2713aSLionel Sambuc // RUN: -include %t.h %s | FileCheck %s 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc // From header 34*f4a2713aSLionel Sambuc // CHECK: macro definition=OBSCURE 35*f4a2713aSLionel Sambuc // CHECK: macro definition=DECORATION 36*f4a2713aSLionel Sambuc // CHECK: macro expansion=DECORATION:2:9 37*f4a2713aSLionel Sambuc // CHECK: macro expansion=OBSCURE:1:9 38*f4a2713aSLionel Sambuc // CHECK: macro expansion=DECORATION:2:9 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc // From main file 41*f4a2713aSLionel Sambuc // CHECK: macro expansion=OBSCURE:1:9 42*f4a2713aSLionel Sambuc // CHECK: macro expansion=OBSCURE:1:9 43*f4a2713aSLionel Sambuc // CHECK: macro expansion=DECORATION:2:9 44