diff options
author | Richard Trieu <rtrieu@google.com> | 2017-06-13 22:21:18 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2017-06-13 22:21:18 +0000 |
commit | 4249ebf5fb8ab864ce53ff86c1e22f72ff4ad566 (patch) | |
tree | 0e739eaa4e58c79af38f63742365c9a700a7c70b /test/Modules | |
parent | dd0f1b09416ebbe33f0f30aa1d759db9eeb0f89f (diff) |
[ODRHash] Add TemplateArgument kind to hash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/odr_hash.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Modules/odr_hash.cpp b/test/Modules/odr_hash.cpp index cc953d0c05..b38a0f8f45 100644 --- a/test/Modules/odr_hash.cpp +++ b/test/Modules/odr_hash.cpp @@ -1002,6 +1002,24 @@ S2 s2; #endif } +namespace TemplateArgument { +#if defined(FIRST) +template <class> struct U1{}; +struct S1 { + U1<int> x; +}; +#elif defined(SECOND) +template <int> struct U1{}; +struct S1 { + U1<1> x; +}; +#else +S1 s1; +// expected-error@first.h:* {{'TemplateArgument::S1::x' from module 'FirstModule' is not present in definition of 'TemplateArgument::S1' 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 // while struct T should error at the access specifier mismatch at the end. namespace AllDecls { |