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