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