forked from llvm-mirror/clang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ODRHash] Hash TemplateArgument::Pack and TemplateTypeParmType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305440 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
5ae017d
commit 8e8d2bb
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1068,7 +1068,48 @@ S4 s4; | |
// [email protected]:* {{'TemplateArgument::S4::x' from module 'FirstModule' is not present in definition of 'TemplateArgument::S4' in module 'SecondModule'}} | ||
// [email protected]:* {{declaration of 'x' does not match}} | ||
#endif | ||
} | ||
|
||
namespace TemplateTypeParmType { | ||
#if defined(FIRST) | ||
template <class T1, class T2> | ||
struct S1 { | ||
T1 x; | ||
}; | ||
#elif defined(SECOND) | ||
template <class T1, class T2> | ||
struct S1 { | ||
T2 x; | ||
}; | ||
#else | ||
using TemplateTypeParmType::S1; | ||
// [email protected]:* {{'TemplateTypeParmType::S1::x' from module 'FirstModule' is not present in definition of 'S1<T1, T2>' in module 'SecondModule'}} | ||
// [email protected]:* {{declaration of 'x' does not match}} | ||
#endif | ||
|
||
#if defined(FIRST) | ||
template <int ...Ts> | ||
struct U2 {}; | ||
template <int T, int U> | ||
class S2 { | ||
typedef U2<U, T> type; | ||
type x; | ||
}; | ||
#elif defined(SECOND) | ||
template <int ...Ts> | ||
struct U2 {}; | ||
template <int T, int U> | ||
class S2 { | ||
typedef U2<T, U> type; | ||
type x; | ||
}; | ||
#else | ||
using TemplateTypeParmType::S2; | ||
// [email protected]:* {{'TemplateTypeParmType::S2::x' from module 'FirstModule' is not present in definition of 'S2<T, U>' in module 'SecondModule'}} | ||
// [email protected]:* {{declaration of 'x' does not match}} | ||
// [email protected]:* {{'TemplateTypeParmType::S2::type' from module 'FirstModule' is not present in definition of 'S2<T, U>' in module 'SecondModule'}} | ||
// [email protected]:* {{declaration of 'type' does not match}} | ||
#endif | ||
} | ||
|
||
// Interesting cases that should not cause errors. struct S should not error | ||
|