2011-04-25 00:28:13 +08:00
|
|
|
// no PCH
|
|
|
|
// RUN: %clang_cc1 -include %s -include %s -fsyntax-only %s
|
|
|
|
// with PCH
|
|
|
|
// RUN: %clang_cc1 -chain-include %s -chain-include %s -fsyntax-only %s
|
2013-04-04 09:51:11 +08:00
|
|
|
// with PCH, with modules enabled
|
|
|
|
// RUN: %clang_cc1 -chain-include %s -chain-include %s -fsyntax-only -fmodules %s
|
2011-04-25 00:28:13 +08:00
|
|
|
#if !defined(PASS1)
|
|
|
|
#define PASS1
|
|
|
|
|
|
|
|
namespace ns {}
|
2011-04-25 00:28:21 +08:00
|
|
|
namespace os {}
|
2011-04-25 00:28:13 +08:00
|
|
|
|
|
|
|
#elif !defined(PASS2)
|
|
|
|
#define PASS2
|
|
|
|
|
|
|
|
namespace ns {
|
|
|
|
namespace {
|
|
|
|
extern int x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
extern int y;
|
|
|
|
}
|
2011-04-25 00:28:21 +08:00
|
|
|
namespace {
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace os {
|
|
|
|
extern "C" {
|
|
|
|
namespace {
|
|
|
|
extern int z;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-04-25 00:28:13 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
namespace ns {
|
|
|
|
namespace {
|
|
|
|
int x;
|
|
|
|
}
|
|
|
|
void test() {
|
|
|
|
(void)x;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
int y;
|
|
|
|
}
|
|
|
|
void test() {
|
|
|
|
(void)y;
|
|
|
|
}
|
|
|
|
|
2011-04-25 00:28:21 +08:00
|
|
|
namespace os {
|
|
|
|
namespace {
|
|
|
|
int z;
|
|
|
|
}
|
|
|
|
void test() {
|
|
|
|
(void)z;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-25 00:28:13 +08:00
|
|
|
#endif
|