diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-03 23:51:38 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-05-03 23:51:38 +0000 |
commit | 6cc60c9164a96f1d73ccfd302303490e0d085b87 (patch) | |
tree | f2639ec1876eaba545ef3845d3572424ae9cc621 /include/clang | |
parent | db45e9b8b840d510c5c5bc1bf7476e70312c59dd (diff) |
CWG issue 727: Fix numerous bugs in support for class-scope explicit
specializations for variable templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Decl.h | 6 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 3 | ||||
-rw-r--r-- | include/clang/Sema/Template.h | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 507ca73fcb..da8128937e 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1434,6 +1434,12 @@ public: /// template specialization or instantiation this is. TemplateSpecializationKind getTemplateSpecializationKind() const; + /// Get the template specialization kind of this variable for the purposes of + /// template instantiation. This differs from getTemplateSpecializationKind() + /// for an instantiation of a class-scope explicit specialization. + TemplateSpecializationKind + getTemplateSpecializationKindForInstantiation() const; + /// If this variable is an instantiation of a variable template or a /// static data member of a class template, determine its point of /// instantiation. diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 64b92d2e7a..93932b4ff6 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -8043,7 +8043,8 @@ public: LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, - bool InstantiatingVarTemplate = false); + bool InstantiatingVarTemplate = false, + VarTemplateSpecializationDecl *PrevVTSD = nullptr); void InstantiateVariableInitializer( VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs); diff --git a/include/clang/Sema/Template.h b/include/clang/Sema/Template.h index 61de93449e..98f7dd584b 100644 --- a/include/clang/Sema/Template.h +++ b/include/clang/Sema/Template.h @@ -545,7 +545,8 @@ class VarDecl; Decl *VisitVarTemplateSpecializationDecl( VarTemplateDecl *VarTemplate, VarDecl *FromVar, void *InsertPos, const TemplateArgumentListInfo &TemplateArgsInfo, - ArrayRef<TemplateArgument> Converted); + ArrayRef<TemplateArgument> Converted, + VarTemplateSpecializationDecl *PrevDecl = nullptr); Decl *InstantiateTypedefNameDecl(TypedefNameDecl *D, bool IsTypeAlias); ClassTemplatePartialSpecializationDecl * |