summaryrefslogtreecommitdiffstats
path: root/test/Modules
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-06-14 03:17:26 +0000
committerRichard Trieu <rtrieu@google.com>2017-06-14 03:17:26 +0000
commit3e9def378979d880f3efab6c7b3e815e00fa6d11 (patch)
tree2944f879c5116b66f9896ffd4627745f746f6f67 /test/Modules
parent5d7ff3b5a971c6ab075551baae7287dabd0fab79 (diff)
[ODRHash] Hash Template and TemplateExpansion in TemplateArgument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r--test/Modules/odr_hash.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Modules/odr_hash.cpp b/test/Modules/odr_hash.cpp
index 36f2e4bea0..51bd626972 100644
--- a/test/Modules/odr_hash.cpp
+++ b/test/Modules/odr_hash.cpp
@@ -1051,6 +1051,24 @@ S3 s3;
// expected-note@first.h:* {{but in 'FirstModule' found type alias 'T' with different underlying type 'U3<2>'}}
#endif
+#if defined(FIRST)
+template<class> struct T4a {};
+template <template <class> class T> struct U4 {};
+struct S4 {
+ U4<T4a> x;
+};
+#elif defined(SECOND)
+template<class> struct T4b {};
+template <template <class> class T> struct U4 {};
+struct S4 {
+ U4<T4b> x;
+};
+#else
+S4 s4;
+// expected-error@first.h:* {{'TemplateArgument::S4::x' from module 'FirstModule' is not present in definition of 'TemplateArgument::S4' in module 'SecondModule'}}
+// expected-note@second.h:* {{declaration of 'x' does not match}}
+#endif
+
}
// Interesting cases that should not cause errors. struct S should not error