1
2 // <rdar://12889089>
3
4 #ifndef HEADER1
5 #define HEADER1
6
7 // CHECK-TU: FunctionDecl:{ResultType void}{TypedText foo}
8 void foo();
9
10 namespace Cake {
11 // CHECK-NAMESPACE: FunctionDecl:{ResultType void}{TypedText lie}
12 void lie();
13 }
14
15 #elif !defined(HEADER2)
16 #define HEADER2
17
18 namespace Cake {
19 extern int Baz;
20 }
21
22 #else
23
func()24 void func() {
25 Cake::
26 }
27
28 #endif
29
30 // RUN: c-index-test -write-pch %t1.h.pch %s
31 // RUN: c-index-test -write-pch %t2.h.pch %s -include %t1.h
32 // RUN: c-index-test -code-completion-at=%s:25:1 %s -include %t2.h | FileCheck -check-prefix=CHECK-TU %s
33 // RUN: c-index-test -code-completion-at=%s:25:7 %s -include %t2.h | FileCheck -check-prefix=CHECK-NAMESPACE %s
34