When deserializing an anonymous namespace from a module, do not attach
the anonymous namespace to its parent. Semantically, this means that
the anonymous namespaces defined in one module are distinct from the
anonymous namespaces defined in another module.

llvm-svn: 147782
diff --git a/clang/test/Modules/namespaces.cpp b/clang/test/Modules/namespaces.cpp
index 9ef966a..b60f75c 100644
--- a/clang/test/Modules/namespaces.cpp
+++ b/clang/test/Modules/namespaces.cpp
@@ -47,3 +47,14 @@
   int &ir2 = N9::f(17);
   int &ir3 = N10::f(17);
 }
+
+// Test merging when using anonymous namespaces, which does not
+// actually perform any merging.
+// other file: expected-note{{passing argument to parameter here}}
+void testAnonymousNotMerged() {
+  N11::consumeFoo(N11::getFoo()); // expected-error{{cannot initialize a parameter of type 'N11::<anonymous>::Foo *' with an rvalue of type 'N11::<anonymous>::Foo *'}}
+  N12::consumeFoo(N12::getFoo()); // expected-error{{cannot initialize a parameter of type 'N12::<anonymous>::Foo *' with an rvalue of type 'N12::<anonymous>::Foo *'}}  
+}
+
+
+// other file: expected-note{{passing argument to parameter here}}