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