Implement merging of namespace-scope declarations across modules, so
that we can merge, for example, two occurrences of

  namespace N { void f(); }

in two disjoint modules.

llvm-svn: 147780
diff --git a/clang/test/Modules/namespaces.cpp b/clang/test/Modules/namespaces.cpp
index e1a8d6e..9ef966a 100644
--- a/clang/test/Modules/namespaces.cpp
+++ b/clang/test/Modules/namespaces.cpp
@@ -5,6 +5,8 @@
   char &f(char);
 }
 
+namespace N8 { }
+
 @import namespaces_left;
 @import namespaces_right;
 
@@ -23,6 +25,10 @@
   char &f(char);
 }
 
+namespace N10 { 
+  int &f(int);
+}
+
 void testMerged() {
   int &ir1 = N5::f(17);
   int &ir2 = N6::f(17);
@@ -34,3 +40,10 @@
   char &cr2 = N6::f('b');
 }
 
+// Test merging of declarations within namespaces that themselves were
+// merged without a common first declaration.
+void testMergedMerged() {
+  int &ir1 = N8::f(17);
+  int &ir2 = N9::f(17);
+  int &ir3 = N10::f(17);
+}