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