Skip to content

Commit

Permalink
[clang][Parser][NFC] Reformat if statement
Browse files Browse the repository at this point in the history
Pull the nested if statement into the outer one.
  • Loading branch information
tbaederr committed Sep 28, 2023
1 parent 9816edc commit b406819
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clang/lib/Parse/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1449,12 +1449,12 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,

// With abbreviated function templates - we need to explicitly add depth to
// account for the implicit template parameter list induced by the template.
if (auto *Template = dyn_cast_or_null<FunctionTemplateDecl>(Res))
if (Template->isAbbreviated() &&
Template->getTemplateParameters()->getParam(0)->isImplicit())
// First template parameter is implicit - meaning no explicit template
// parameter list was specified.
CurTemplateDepthTracker.addDepth(1);
if (const auto *Template = dyn_cast_if_present<FunctionTemplateDecl>(Res);
Template && Template->isAbbreviated() &&
Template->getTemplateParameters()->getParam(0)->isImplicit())
// First template parameter is implicit - meaning no explicit template
// parameter list was specified.
CurTemplateDepthTracker.addDepth(1);

if (SkipFunctionBodies && (!Res || Actions.canSkipFunctionBody(Res)) &&
trySkippingFunctionBody()) {
Expand Down

0 comments on commit b406819

Please sign in to comment.