Skip to content

Commit 8e2a2a4

Browse files
committed
clang-format
1 parent 0bdb18c commit 8e2a2a4

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,21 +2776,18 @@ NamedDecl *transformTemplateParameter(Sema &SemaRef, DeclContext *DC,
27762776
return transformTemplateTypeParam(SemaRef, DC, TTP, Args, NewDepth,
27772777
NewIndex);
27782778
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);
27812780
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);
27842782
llvm_unreachable("Unhandled template parameter types");
27852783
}
27862784

27872785
// Transform the require-clause of F if any.
27882786
// The return result is expected to be the require-clause for the synthesized
27892787
// 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) {
27942791
Expr *RC = F->getTemplateParameters()->getRequiresClause();
27952792
if (!RC)
27962793
return nullptr;
@@ -2816,7 +2813,8 @@ Expr *transformRequireClause(
28162813
// For 1), if the alias template is nested within a class template, we
28172814
// calcualte the 'uninstantiated' depth by adding the substitution level back.
28182815
unsigned AdjustDepth = 0;
2819-
if (auto *PrimaryTemplate = AliasTemplate->getInstantiatedFromMemberTemplate())
2816+
if (auto *PrimaryTemplate =
2817+
AliasTemplate->getInstantiatedFromMemberTemplate())
28202818
AdjustDepth = PrimaryTemplate->getTemplateDepth();
28212819

28222820
// We rebuild all template parameters with the uninstantiated depth, and
@@ -3040,7 +3038,8 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
30403038
Args.addOuterTemplateArguments(TransformedDeducedAliasArgs);
30413039
NamedDecl *NewParam = transformTemplateParameter(
30423040
SemaRef, AliasTemplate->getDeclContext(), TP, Args,
3043-
/*NewIndex=*/FPrimeTemplateParams.size(), getTemplateParameterDepth(TP));
3041+
/*NewIndex=*/FPrimeTemplateParams.size(),
3042+
getTemplateParameterDepth(TP));
30443043
FPrimeTemplateParams.push_back(NewParam);
30453044

30463045
auto NewTemplateArgument = Context.getCanonicalTemplateArgument(
@@ -3113,8 +3112,8 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef,
31133112
Sema::CodeSynthesisContext::BuildingDeductionGuides)) {
31143113
auto *GG = cast<CXXDeductionGuideDecl>(FPrime);
31153114

3116-
Expr *RequiresClause = transformRequireClause(
3117-
SemaRef, F, AliasTemplate, DeduceResults);
3115+
Expr *RequiresClause =
3116+
transformRequireClause(SemaRef, F, AliasTemplate, DeduceResults);
31183117

31193118
// FIXME: implement the is_deducible constraint per C++
31203119
// [over.match.class.deduct]p3.3:

0 commit comments

Comments
 (0)