1// no PCH 2// RUN: %clang_cc1 -include %s -include %s -fsyntax-only %s 3// with PCH 4// RUN: %clang_cc1 -chain-include %s -chain-include %s -fsyntax-only %s 5#if !defined(PASS1) 6#define PASS1 7 8namespace ns {} 9namespace os {} 10 11#elif !defined(PASS2) 12#define PASS2 13 14namespace ns { 15 namespace { 16 extern int x; 17 } 18} 19 20namespace { 21 extern int y; 22} 23namespace { 24} 25 26namespace os { 27 extern "C" { 28 namespace { 29 extern int z; 30 } 31 } 32} 33 34#else 35 36namespace ns { 37 namespace { 38 int x; 39 } 40 void test() { 41 (void)x; 42 } 43} 44 45namespace { 46 int y; 47} 48void test() { 49 (void)y; 50} 51 52namespace os { 53 namespace { 54 int z; 55 } 56 void test() { 57 (void)z; 58 } 59} 60 61#endif 62