xref: /llvm-project/clang/test/PCH/chain-empty-initial-namespace.cpp (revision f830df4e9d1aa0c6971de46d0b8c899788443cb9)
1*f830df4eSSebastian Redl // no PCH
2*f830df4eSSebastian Redl // RUN: %clang_cc1 -include %s -include %s -fsyntax-only %s
3*f830df4eSSebastian Redl // full PCH
4*f830df4eSSebastian Redl // RUN: %clang_cc1 -chain-include %s -chain-include %s -fsyntax-only %s
5*f830df4eSSebastian Redl #if !defined(PASS1)
6*f830df4eSSebastian Redl #define PASS1
7*f830df4eSSebastian Redl 
8*f830df4eSSebastian Redl namespace foo {} // no external storage
9*f830df4eSSebastian Redl 
10*f830df4eSSebastian Redl #elif !defined(PASS2)
11*f830df4eSSebastian Redl #define PASS2
12*f830df4eSSebastian Redl 
13*f830df4eSSebastian Redl namespace foo {
14*f830df4eSSebastian Redl   void bar();
15*f830df4eSSebastian Redl }
16*f830df4eSSebastian Redl 
17*f830df4eSSebastian Redl #else
18*f830df4eSSebastian Redl // PASS3
19*f830df4eSSebastian Redl 
test()20*f830df4eSSebastian Redl void test() {
21*f830df4eSSebastian Redl   foo::bar(); // no-error
22*f830df4eSSebastian Redl }
23*f830df4eSSebastian Redl 
24*f830df4eSSebastian Redl #endif
25