blob: 866976f990d8cf0d5685a6c79e4cc03bec227062 [file] [log] [blame]
Sam McCallbb2cf632018-01-12 14:51:47 +00001namespace ns {
2int bar;
3}
4
5int main() { return ns:: }
6
7// RUN: echo "namespace ns { int foo; }" > %t.h
8// RUN: c-index-test -write-pch %t.h.pch -x c++-header %t.h
9//
10// RUN: c-index-test -code-completion-at=%s:5:26 -include %t.h %s | FileCheck -check-prefix=WITH-PCH %s
11// WITH-PCH: {TypedText bar}
12// WITH-PCH: {TypedText foo}
13
14// RUN: env CINDEXTEST_COMPLETION_SKIP_PREAMBLE=1 c-index-test -code-completion-at=%s:5:26 -include %t.h %s | FileCheck -check-prefix=SKIP-PCH %s
15// SKIP-PCH-NOT: foo
16// SKIP-PCH: {TypedText bar}
17// SKIP-PCH-NOT: foo
18