@@ -11833,7 +11833,7 @@ class Sema final : public SemaBase {
11833
11833
bool *ConstraintsNotSatisfied = nullptr);
11834
11834
11835
11835
bool CheckTemplateTypeArgument(
11836
- TemplateArgumentLoc &Arg,
11836
+ TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg,
11837
11837
SmallVectorImpl<TemplateArgument> &SugaredConverted,
11838
11838
SmallVectorImpl<TemplateArgument> &CanonicalConverted);
11839
11839
@@ -11869,13 +11869,9 @@ class Sema final : public SemaBase {
11869
11869
bool PartialOrdering,
11870
11870
bool *StrictPackMatch);
11871
11871
11872
- /// Print the given named declaration to a string,
11873
- /// using the current PrintingPolicy, except that
11874
- /// TerseOutput will always be set.
11875
- SmallString<128> toTerseString(const NamedDecl &D) const;
11876
-
11877
11872
void NoteTemplateLocation(const NamedDecl &Decl,
11878
11873
std::optional<SourceRange> ParamRange = {});
11874
+ void NoteTemplateParameterLocation(const NamedDecl &Decl);
11879
11875
11880
11876
/// Given a non-type template argument that refers to a
11881
11877
/// declaration and the type of its corresponding non-type template
@@ -11990,13 +11986,15 @@ class Sema final : public SemaBase {
11990
11986
bool TemplateParameterListsAreEqual(
11991
11987
const TemplateCompareNewDeclInfo &NewInstFrom, TemplateParameterList *New,
11992
11988
const NamedDecl *OldInstFrom, TemplateParameterList *Old, bool Complain,
11993
- TemplateParameterListEqualKind Kind);
11989
+ TemplateParameterListEqualKind Kind,
11990
+ SourceLocation TemplateArgLoc = SourceLocation());
11994
11991
11995
- bool TemplateParameterListsAreEqual(TemplateParameterList *New,
11996
- TemplateParameterList *Old, bool Complain,
11997
- TemplateParameterListEqualKind Kind) {
11992
+ bool TemplateParameterListsAreEqual(
11993
+ TemplateParameterList *New, TemplateParameterList *Old, bool Complain,
11994
+ TemplateParameterListEqualKind Kind,
11995
+ SourceLocation TemplateArgLoc = SourceLocation()) {
11998
11996
return TemplateParameterListsAreEqual(nullptr, New, nullptr, Old, Complain,
11999
- Kind);
11997
+ Kind, TemplateArgLoc );
12000
11998
}
12001
11999
12002
12000
/// Check whether a template can be declared within this scope.
@@ -12876,11 +12874,6 @@ class Sema final : public SemaBase {
12876
12874
12877
12875
/// We are performing partial ordering for template template parameters.
12878
12876
PartialOrderingTTP,
12879
-
12880
- /// We are Checking a Template Parameter, so for any diagnostics which
12881
- /// occur in this scope, we will add a context note which points to this
12882
- /// template parameter.
12883
- CheckTemplateParameter,
12884
12877
} Kind;
12885
12878
12886
12879
/// Was the enclosing context a non-instantiation SFINAE context?
@@ -13108,11 +13101,6 @@ class Sema final : public SemaBase {
13108
13101
PartialOrderingTTP, TemplateDecl *PArg,
13109
13102
SourceRange InstantiationRange = SourceRange());
13110
13103
13111
- struct CheckTemplateParameter {};
13112
- /// \brief Note that we are checking a template parameter.
13113
- InstantiatingTemplate(Sema &SemaRef, CheckTemplateParameter,
13114
- NamedDecl *Param);
13115
-
13116
13104
/// Note that we have finished instantiating this template.
13117
13105
void Clear();
13118
13106
@@ -13146,13 +13134,6 @@ class Sema final : public SemaBase {
13146
13134
InstantiatingTemplate &operator=(const InstantiatingTemplate &) = delete;
13147
13135
};
13148
13136
13149
- /// For any diagnostics which occur within its scope, adds a context note
13150
- /// pointing to the declaration of the template parameter.
13151
- struct CheckTemplateParameterRAII : InstantiatingTemplate {
13152
- CheckTemplateParameterRAII(Sema &S, NamedDecl *Param)
13153
- : InstantiatingTemplate(S, CheckTemplateParameter(), Param) {}
13154
- };
13155
-
13156
13137
bool SubstTemplateArgument(const TemplateArgumentLoc &Input,
13157
13138
const MultiLevelTemplateArgumentList &TemplateArgs,
13158
13139
TemplateArgumentLoc &Output,
0 commit comments