Implement cross-module declaration merging for tag declarations, so
that if two modules A and B both contain a declaration of a tag such
as

  struct X;

and those two modules are unrelated, the two declarations of X will be
merged into a single redeclaration chain.

llvm-svn: 147488
diff --git a/clang/test/Modules/Inputs/redecl-merge-right.h b/clang/test/Modules/Inputs/redecl-merge-right.h
index b6dfe2f..686a962 100644
--- a/clang/test/Modules/Inputs/redecl-merge-right.h
+++ b/clang/test/Modules/Inputs/redecl-merge-right.h
@@ -21,6 +21,12 @@
 
 @protocol P2;
 
+struct S1;
+struct S2;
+
+void consume_S1(struct S1*);
+struct S2 *produce_S2(void);
+
 // Test declarations in different modules with no common initial
 // declaration.
 @class C;
@@ -47,6 +53,12 @@
 @protocol P3;
 @protocol P3;
 
+struct S3;
+struct S4;
+
+void consume_S3(struct S3*);
+struct S4 *produce_S4(void);
+
 #ifdef __cplusplus
 template<typename T> class Vector { 
 public: