summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r--clang/test/Modules/Inputs/cxx-templates-a.h6
-rw-r--r--clang/test/Modules/Inputs/cxx-templates-b.h6
-rw-r--r--clang/test/Modules/Inputs/templates-left.h2
-rw-r--r--clang/test/Modules/Inputs/templates-right.h2
-rw-r--r--clang/test/Modules/Inputs/templates-top.h4
5 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/cxx-templates-a.h b/clang/test/Modules/Inputs/cxx-templates-a.h
index dbf12dacbae..37e3426fc0b 100644
--- a/clang/test/Modules/Inputs/cxx-templates-a.h
+++ b/clang/test/Modules/Inputs/cxx-templates-a.h
@@ -24,3 +24,9 @@ template<typename T> void PerformDelayedLookup(T &t) {
template<typename T> void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {}
template<typename T> struct RedeclaredAsFriend {};
+
+void use_some_template_a() {
+ SomeTemplate<char[2]> a;
+ SomeTemplate<char[1]> b, c;
+ b = c;
+}
diff --git a/clang/test/Modules/Inputs/cxx-templates-b.h b/clang/test/Modules/Inputs/cxx-templates-b.h
index 9bc76d5bbae..c495074a93f 100644
--- a/clang/test/Modules/Inputs/cxx-templates-b.h
+++ b/clang/test/Modules/Inputs/cxx-templates-b.h
@@ -35,6 +35,12 @@ struct RedeclareTemplateAsFriend {
friend struct RedeclaredAsFriend;
};
+void use_some_template_b() {
+ SomeTemplate<char[1]> a;
+ SomeTemplate<char[2]> b, c;
+ b = c;
+}
+
@import cxx_templates_a;
template<typename T> void UseDefinedInBImplIndirectly(T &v) {
PerformDelayedLookup(v);
diff --git a/clang/test/Modules/Inputs/templates-left.h b/clang/test/Modules/Inputs/templates-left.h
index 7451420c748..7c9be8c6514 100644
--- a/clang/test/Modules/Inputs/templates-left.h
+++ b/clang/test/Modules/Inputs/templates-left.h
@@ -27,3 +27,5 @@ void triggerPendingInstantiation() {
}
void redeclDefinitionEmit(){}
+
+typedef Outer<int>::Inner OuterIntInner_left;
diff --git a/clang/test/Modules/Inputs/templates-right.h b/clang/test/Modules/Inputs/templates-right.h
index d3524d34769..bacaa49b60c 100644
--- a/clang/test/Modules/Inputs/templates-right.h
+++ b/clang/test/Modules/Inputs/templates-right.h
@@ -25,3 +25,5 @@ void triggerPendingInstantiationToo() {
}
void redeclDefinitionEmit(){}
+
+typedef Outer<int>::Inner OuterIntInner_right;
diff --git a/clang/test/Modules/Inputs/templates-top.h b/clang/test/Modules/Inputs/templates-top.h
index 5985ee8820d..b5d0b6bda13 100644
--- a/clang/test/Modules/Inputs/templates-top.h
+++ b/clang/test/Modules/Inputs/templates-top.h
@@ -15,3 +15,7 @@ template <typename T> class A::WhereAmI {
public:
static void func() {}
};
+
+template<typename T> struct Outer {
+ struct Inner {};
+};
OpenPOWER on IntegriCloud