blob: 87205c631b3a8adbc02b36261493e6348e125d67 [file] [log] [blame]
Sebastian Redl7c0837f2011-04-24 16:28:13 +00001// 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 {}
Sebastian Redl74b485a2011-04-24 16:28:21 +00009namespace os {}
Sebastian Redl7c0837f2011-04-24 16:28:13 +000010
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}
Sebastian Redl74b485a2011-04-24 16:28:21 +000023namespace {
24}
25
26namespace os {
27 extern "C" {
28 namespace {
29 extern int z;
30 }
31 }
32}
Sebastian Redl7c0837f2011-04-24 16:28:13 +000033
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
Sebastian Redl74b485a2011-04-24 16:28:21 +000052namespace os {
53 namespace {
54 int z;
55 }
56 void test() {
57 (void)z;
58 }
59}
60
Sebastian Redl7c0837f2011-04-24 16:28:13 +000061#endif