5 int main() { return ns:: }
6 int main2() { return ns::foo(). }
8 // RUN: echo "namespace ns { struct foo { int baz }; }" > %t.h
9 // RUN: c-index-test -write-pch %t.h.pch -x c++-header %t.h
11 // RUN: c-index-test -code-completion-at=%s:5:26 -include %t.h %s | FileCheck -check-prefix=WITH-PCH %s
12 // WITH-PCH: {TypedText bar}
13 // WITH-PCH: {TypedText foo}
15 // 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
17 // SKIP-PCH: {TypedText bar}
20 // Verify that with *no* preamble (no -include flag) we still get local results.
21 // SkipPreamble used to break this, by making lookup *too* lazy.
22 // RUN: env CINDEXTEST_COMPLETION_SKIP_PREAMBLE=1 c-index-test -code-completion-at=%s:5:26 %s | FileCheck -check-prefix=NO-PCH %s
24 // NO-PCH: {TypedText bar}
27 // Verify that we still get member results from the preamble.
28 // RUN: env CINDEXTEST_COMPLETION_SKIP_PREAMBLE=1 c-index-test -code-completion-at=%s:6:32 -include %t.h %s | FileCheck -check-prefix=MEMBER %s
29 // MEMBER: {TypedText baz}