summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/merge-template-pattern-visibility
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-07-08 02:22:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-07-08 02:22:15 +0000
commit7a591a4a46eba3e498e7d6637cbf9c01bb18171f (patch)
tree3cd2c980ba1e7c24c1e75591505d782f4b1b1170 /clang/test/Modules/Inputs/merge-template-pattern-visibility
parentbbe5c4cdcdeb8431ab82c59f4a448bbf14489370 (diff)
downloadbcm5719-llvm-7a591a4a46eba3e498e7d6637cbf9c01bb18171f.tar.gz
bcm5719-llvm-7a591a4a46eba3e498e7d6637cbf9c01bb18171f.zip
[modules] When determining the visible module set during template
instantiation, use the set of modules visible from the template definition, not from whichever declaration the specialization was instantiated from. llvm-svn: 241662
Diffstat (limited to 'clang/test/Modules/Inputs/merge-template-pattern-visibility')
-rw-r--r--clang/test/Modules/Inputs/merge-template-pattern-visibility/a.h5
-rw-r--r--clang/test/Modules/Inputs/merge-template-pattern-visibility/b.h9
-rw-r--r--clang/test/Modules/Inputs/merge-template-pattern-visibility/module.modulemap4
3 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/merge-template-pattern-visibility/a.h b/clang/test/Modules/Inputs/merge-template-pattern-visibility/a.h
new file mode 100644
index 00000000000..7f9b6497e72
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-template-pattern-visibility/a.h
@@ -0,0 +1,5 @@
+template<typename, typename = int> struct A;
+template<typename T> struct B;
+
+template<typename, typename> struct A {};
+template<typename T> struct B : A<T> {};
diff --git a/clang/test/Modules/Inputs/merge-template-pattern-visibility/b.h b/clang/test/Modules/Inputs/merge-template-pattern-visibility/b.h
new file mode 100644
index 00000000000..5ed18e7e7c5
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-template-pattern-visibility/b.h
@@ -0,0 +1,9 @@
+template<typename, typename = int> struct A;
+template<typename T> struct B;
+
+template<typename, typename> struct A {};
+template<typename T> struct B : A<T> {};
+
+inline void f() {
+ B<int> bi;
+}
diff --git a/clang/test/Modules/Inputs/merge-template-pattern-visibility/module.modulemap b/clang/test/Modules/Inputs/merge-template-pattern-visibility/module.modulemap
new file mode 100644
index 00000000000..ba97abbaa8e
--- /dev/null
+++ b/clang/test/Modules/Inputs/merge-template-pattern-visibility/module.modulemap
@@ -0,0 +1,4 @@
+module X {
+ module A { header "a.h" }
+ module B { header "b.h" }
+}
OpenPOWER on IntegriCloud