[modules] If we reach a definition of a class for which we already have a
non-visible definition, skip the new definition and make the old one visible
instead of trying to parse it again and failing horribly. C++'s ODR allows
us to assume that the two definitions are identical.
llvm-svn: 233250
diff --git a/clang/test/Modules/Inputs/submodules-merge-defs/import-and-redefine.h b/clang/test/Modules/Inputs/submodules-merge-defs/import-and-redefine.h
new file mode 100644
index 0000000..8d695bc
--- /dev/null
+++ b/clang/test/Modules/Inputs/submodules-merge-defs/import-and-redefine.h
@@ -0,0 +1,5 @@
+// Trigger import of definitions, but don't make them visible.
+#include "empty.h"
+
+// Now parse the definitions again.
+#include "defs.h"