@@ -2776,21 +2776,18 @@ NamedDecl *transformTemplateParameter(Sema &SemaRef, DeclContext *DC,
2776
2776
return transformTemplateTypeParam(SemaRef, DC, TTP, Args, NewDepth,
2777
2777
NewIndex);
2778
2778
if (auto *TTP = dyn_cast<TemplateTemplateParmDecl>(TemplateParam))
2779
- return transformTemplateParam(SemaRef, DC, TTP, Args, NewIndex,
2780
- NewDepth);
2779
+ return transformTemplateParam(SemaRef, DC, TTP, Args, NewIndex, NewDepth);
2781
2780
if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(TemplateParam))
2782
- return transformTemplateParam(SemaRef, DC, NTTP, Args, NewIndex,
2783
- NewDepth);
2781
+ return transformTemplateParam(SemaRef, DC, NTTP, Args, NewIndex, NewDepth);
2784
2782
llvm_unreachable("Unhandled template parameter types");
2785
2783
}
2786
2784
2787
2785
// Transform the require-clause of F if any.
2788
2786
// The return result is expected to be the require-clause for the synthesized
2789
2787
// alias deduction guide.
2790
- Expr *transformRequireClause(
2791
- Sema &SemaRef, FunctionTemplateDecl *F,
2792
- TypeAliasTemplateDecl *AliasTemplate,
2793
- ArrayRef<DeducedTemplateArgument> DeduceResults) {
2788
+ Expr *transformRequireClause(Sema &SemaRef, FunctionTemplateDecl *F,
2789
+ TypeAliasTemplateDecl *AliasTemplate,
2790
+ ArrayRef<DeducedTemplateArgument> DeduceResults) {
2794
2791
Expr *RC = F->getTemplateParameters()->getRequiresClause();
2795
2792
if (!RC)
2796
2793
return nullptr;
@@ -2816,7 +2813,8 @@ Expr *transformRequireClause(
2816
2813
// For 1), if the alias template is nested within a class template, we
2817
2814
// calcualte the 'uninstantiated' depth by adding the substitution level back.
2818
2815
unsigned AdjustDepth = 0;
2819
- if (auto *PrimaryTemplate = AliasTemplate->getInstantiatedFromMemberTemplate())
2816
+ if (auto *PrimaryTemplate =
2817
+ AliasTemplate->getInstantiatedFromMemberTemplate())
2820
2818
AdjustDepth = PrimaryTemplate->getTemplateDepth();
2821
2819
2822
2820
// We rebuild all template parameters with the uninstantiated depth, and
@@ -3040,7 +3038,8 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
3040
3038
Args.addOuterTemplateArguments(TransformedDeducedAliasArgs);
3041
3039
NamedDecl *NewParam = transformTemplateParameter(
3042
3040
SemaRef, AliasTemplate->getDeclContext(), TP, Args,
3043
- /*NewIndex=*/FPrimeTemplateParams.size(), getTemplateParameterDepth(TP));
3041
+ /*NewIndex=*/FPrimeTemplateParams.size(),
3042
+ getTemplateParameterDepth(TP));
3044
3043
FPrimeTemplateParams.push_back(NewParam);
3045
3044
3046
3045
auto NewTemplateArgument = Context.getCanonicalTemplateArgument(
@@ -3113,8 +3112,8 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
3113
3112
Sema::CodeSynthesisContext::BuildingDeductionGuides)) {
3114
3113
auto *GG = cast<CXXDeductionGuideDecl>(FPrime);
3115
3114
3116
- Expr *RequiresClause = transformRequireClause(
3117
- SemaRef, F, AliasTemplate, DeduceResults);
3115
+ Expr *RequiresClause =
3116
+ transformRequireClause( SemaRef, F, AliasTemplate, DeduceResults);
3118
3117
3119
3118
// FIXME: implement the is_deducible constraint per C++
3120
3119
// [over.match.class.deduct]p3.3:
0 commit comments