forked from OSchip/llvm-project
[modules] PR20475: merging support for alias template declarations.
llvm-svn: 214124
This commit is contained in:
parent
2101a7fbcf
commit
f59b735a80
|
@ -2075,6 +2075,9 @@ void ASTDeclReader::mergeTemplatePattern(RedeclarableTemplateDecl *D,
|
|||
Result);
|
||||
if (auto *DVar = dyn_cast<VarDecl>(DPattern))
|
||||
return mergeRedeclarable(DVar, cast<VarDecl>(ExistingPattern), Result);
|
||||
if (auto *DAlias = dyn_cast<TypeAliasDecl>(DPattern))
|
||||
return mergeRedeclarable(DAlias, cast<TypedefNameDecl>(ExistingPattern),
|
||||
Result);
|
||||
llvm_unreachable("merged an unknown kind of redeclarable template");
|
||||
}
|
||||
|
||||
|
|
|
@ -73,3 +73,5 @@ template<typename T> struct MergeTemplateDefinitions {
|
|||
static constexpr int g();
|
||||
};
|
||||
template<typename T> constexpr int MergeTemplateDefinitions<T>::f() { return 1; }
|
||||
|
||||
template<typename T> using AliasTemplate = T;
|
||||
|
|
|
@ -63,6 +63,8 @@ template<> struct MergeSpecializations<double> {
|
|||
typedef int explicitly_specialized_in_b;
|
||||
};
|
||||
|
||||
template<typename U> using AliasTemplate = U;
|
||||
|
||||
@import cxx_templates_a;
|
||||
template<typename T> void UseDefinedInBImplIndirectly(T &v) {
|
||||
PerformDelayedLookup(v);
|
||||
|
|
Loading…
Reference in New Issue