Skip to content

Commit 0fe12a7

Browse files
committed
[clang-format][NFC] Remove a pointer in ContinuationIndenter
1 parent 404d0e9 commit 0fe12a7

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -693,17 +693,14 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
693693

694694
bool DisallowLineBreaksOnThisLine =
695695
Style.LambdaBodyIndentation == FormatStyle::LBI_Signature &&
696-
Style.isCpp() && [&Current] {
697-
// Deal with lambda arguments in C++. The aim here is to ensure that we
698-
// don't over-indent lambda function bodies when lambdas are passed as
699-
// arguments to function calls. We do this by ensuring that either all
700-
// arguments (including any lambdas) go on the same line as the function
701-
// call, or we break before the first argument.
702-
const auto *Prev = Current.Previous;
703-
if (!Prev)
704-
return false;
696+
// Deal with lambda arguments in C++. The aim here is to ensure that we
697+
// don't over-indent lambda function bodies when lambdas are passed as
698+
// arguments to function calls. We do this by ensuring that either all
699+
// arguments (including any lambdas) go on the same line as the function
700+
// call, or we break before the first argument.
701+
Style.isCpp() && [&] {
705702
// For example, `/*Newline=*/false`.
706-
if (Prev->is(TT_BlockComment) && Current.SpacesRequiredBefore == 0)
703+
if (Previous.is(TT_BlockComment) && Current.SpacesRequiredBefore == 0)
707704
return false;
708705
const auto *PrevNonComment = Current.getPreviousNonComment();
709706
if (!PrevNonComment || PrevNonComment->isNot(tok::l_paren))

0 commit comments

Comments
 (0)