Set the correct anonymous namespace (must be last reopening), and behave correctly in the presence of the ever-annoying linkage specifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130105 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/PCH/chain-late-anonymous-namespace.cpp b/test/PCH/chain-late-anonymous-namespace.cpp
index 5369947..87205c6 100644
--- a/test/PCH/chain-late-anonymous-namespace.cpp
+++ b/test/PCH/chain-late-anonymous-namespace.cpp
@@ -6,6 +6,7 @@
#define PASS1
namespace ns {}
+namespace os {}
#elif !defined(PASS2)
#define PASS2
@@ -19,6 +20,16 @@
namespace {
extern int y;
}
+namespace {
+}
+
+namespace os {
+ extern "C" {
+ namespace {
+ extern int z;
+ }
+ }
+}
#else
@@ -38,4 +49,13 @@
(void)y;
}
+namespace os {
+ namespace {
+ int z;
+ }
+ void test() {
+ (void)z;
+ }
+}
+
#endif