summaryrefslogtreecommitdiff
path: root/test/Modules/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/Inputs')
-rw-r--r--test/Modules/Inputs/DebugCXX.h3
-rw-r--r--test/Modules/Inputs/odr_hash-Friend/Box.h14
-rw-r--r--test/Modules/Inputs/odr_hash-Friend/M1.h6
-rw-r--r--test/Modules/Inputs/odr_hash-Friend/M2.h5
-rw-r--r--test/Modules/Inputs/odr_hash-Friend/M3.h7
-rw-r--r--test/Modules/Inputs/odr_hash-Friend/module.modulemap15
6 files changed, 50 insertions, 0 deletions
diff --git a/test/Modules/Inputs/DebugCXX.h b/test/Modules/Inputs/DebugCXX.h
index 1ccf8d302f13b..8f83c0bc69dba 100644
--- a/test/Modules/Inputs/DebugCXX.h
+++ b/test/Modules/Inputs/DebugCXX.h
@@ -1,4 +1,7 @@
/* -*- C++ -*- */
+
+#include "dummy.h"
+
namespace DebugCXX {
// Records.
struct Struct {
diff --git a/test/Modules/Inputs/odr_hash-Friend/Box.h b/test/Modules/Inputs/odr_hash-Friend/Box.h
new file mode 100644
index 0000000000000..01ab90d601c2d
--- /dev/null
+++ b/test/Modules/Inputs/odr_hash-Friend/Box.h
@@ -0,0 +1,14 @@
+template <class T>
+struct iterator {
+ void Compare(const iterator &x) { }
+ friend void Check(iterator) {}
+};
+
+template <class T = int> struct Box {
+ iterator<T> I;
+
+ void test() {
+ Check(I);
+ I.Compare(I);
+ }
+};
diff --git a/test/Modules/Inputs/odr_hash-Friend/M1.h b/test/Modules/Inputs/odr_hash-Friend/M1.h
new file mode 100644
index 0000000000000..202ad06c3488c
--- /dev/null
+++ b/test/Modules/Inputs/odr_hash-Friend/M1.h
@@ -0,0 +1,6 @@
+#include "Box.h"
+
+void Peek() {
+ Box<> Gift;
+ Gift.test();
+}
diff --git a/test/Modules/Inputs/odr_hash-Friend/M2.h b/test/Modules/Inputs/odr_hash-Friend/M2.h
new file mode 100644
index 0000000000000..69f08a957ede8
--- /dev/null
+++ b/test/Modules/Inputs/odr_hash-Friend/M2.h
@@ -0,0 +1,5 @@
+#include "Box.h"
+void x() {
+ Box<> Unused;
+ //Unused.test();
+}
diff --git a/test/Modules/Inputs/odr_hash-Friend/M3.h b/test/Modules/Inputs/odr_hash-Friend/M3.h
new file mode 100644
index 0000000000000..ab457e0c08f21
--- /dev/null
+++ b/test/Modules/Inputs/odr_hash-Friend/M3.h
@@ -0,0 +1,7 @@
+#include "Box.h"
+#include "M2.h"
+
+void Party() {
+ Box<> Present;
+ Present.test();
+}
diff --git a/test/Modules/Inputs/odr_hash-Friend/module.modulemap b/test/Modules/Inputs/odr_hash-Friend/module.modulemap
new file mode 100644
index 0000000000000..28e1832e30e9a
--- /dev/null
+++ b/test/Modules/Inputs/odr_hash-Friend/module.modulemap
@@ -0,0 +1,15 @@
+module Box {
+ header "Box.h"
+}
+
+module Module1 {
+ header "M1.h"
+}
+
+module Module2 {
+ header "M2.h"
+}
+
+module Module3 {
+ header "M3.h"
+}