66 lines · c
1 2#include "targeted-top.h"3#include "targeted-preamble.h"4 5int LocalVar1;6int LocalVar2;7 8// RUN: c-index-test -write-pch %t.h.pch %S/targeted-top.h9// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%s:5:10 %s -include %t.h \10// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \11// RUN: -Xclang -error-on-deserialized-decl=TopVar \12// RUN: | FileCheck %s -check-prefix=LOCAL-CURSOR113 14// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-top.h:11:15 %s -include %t.h \15// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \16// RUN: -Xclang -error-on-deserialized-decl=vector_get_x \17// RUN: | FileCheck %s -check-prefix=TOP-CURSOR118 19// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \20// RUN: -Xclang -error-on-deserialized-decl=TopVar \21// RUN: | FileCheck %s -check-prefix=NESTED-CURSOR122 23// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-fields.h:2:7 %s -include %t.h \24// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \25// RUN: -Xclang -error-on-deserialized-decl=TopVar \26// RUN: | FileCheck %s -check-prefix=FIELD-CURSOR127 28// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-fields.h:1:1 %s -include %t.h \29// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \30// RUN: -Xclang -error-on-deserialized-decl=TopVar \31// RUN: | FileCheck %s -check-prefix=FIELD-CURSOR232 33// RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_NO_CACHING=1 \34// RUN: c-index-test -cursor-at=%s:5:10 %s -include %t.h \35// RUN: -Xclang -error-on-deserialized-decl=PreambleVar \36// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \37// RUN: -Xclang -error-on-deserialized-decl=TopVar \38// RUN: | FileCheck %s -check-prefix=LOCAL-CURSOR139 40// RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_NO_CACHING=1 \41// RUN: c-index-test -cursor-at=%S/targeted-top.h:11:15 %s -include %t.h \42// RUN: -Xclang -error-on-deserialized-decl=PreambleVar \43// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \44// RUN: -Xclang -error-on-deserialized-decl=vector_get_x \45// RUN: | FileCheck %s -check-prefix=TOP-CURSOR146 47// RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_NO_CACHING=1 \48// RUN: c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \49// RUN: -Xclang -error-on-deserialized-decl=PreambleVar \50// RUN: -Xclang -error-on-deserialized-decl=TopVar \51// RUN: | FileCheck %s -check-prefix=NESTED-CURSOR152 53// RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_NO_CACHING=1 \54// RUN: c-index-test -cursor-at=%S/targeted-preamble.h:2:15 %s -include %t.h \55// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \56// RUN: -Xclang -error-on-deserialized-decl=TopVar \57// RUN: | FileCheck %s -check-prefix=PREAMBLE-CURSOR158 59// LOCAL-CURSOR1: VarDecl=LocalVar1:5:560// TOP-CURSOR1: VarDecl=TopVar:11:1261// NESTED-CURSOR1: VarDecl=NestedVar1:2:1262// PREAMBLE-CURSOR1: VarDecl=PreambleVar:2:1263 64// FIELD-CURSOR1: FieldDecl=z:2:7 (Definition)65// FIELD-CURSOR2: StructDecl=Vector:13:9 (Definition)66