summaryrefslogtreecommitdiffstats
path: root/test/Modules/merge-template-friend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/merge-template-friend.cpp')
-rw-r--r--test/Modules/merge-template-friend.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Modules/merge-template-friend.cpp b/test/Modules/merge-template-friend.cpp
new file mode 100644
index 0000000..8a1910d
--- /dev/null
+++ b/test/Modules/merge-template-friend.cpp
@@ -0,0 +1,22 @@
+// RUN: rm -rf %t
+//
+// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
+// RUN: -emit-module -fmodule-name=a -o %t/a.pcm \
+// RUN: %S/Inputs/merge-template-friend/module.modulemap
+//
+// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
+// RUN: -emit-module -fmodule-name=b -o %t/b.pcm \
+// RUN: %S/Inputs/merge-template-friend/module.modulemap
+//
+// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
+// RUN: -I%S/Inputs/merge-template-friend \
+// RUN: -fmodule-file=%t/a.pcm \
+// RUN: -fmodule-file=%t/b.pcm \
+// RUN: -verify %s
+
+#include "friend.h"
+#include "def.h"
+
+::ns::C<int> c;
+
+// expected-no-diagnostics
OpenPOWER on IntegriCloud