Skip to content

Commit 4e67a97

Browse files
committed
Fix lambda captures
1 parent 9162a63 commit 4e67a97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,14 +803,14 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
803803
return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while,
804804
tok::kw_switch);
805805
};
806-
auto IsFunctionCallParen = [&](const FormatToken &Tok) {
806+
auto IsFunctionCallParen = [](const FormatToken &Tok) {
807807
return Tok.is(tok::l_paren) && Tok.ParameterCount > 0 && Tok.Previous &&
808808
Tok.Previous->is(tok::identifier);
809809
};
810-
const auto IsInTemplateString = [&](const FormatToken &Tok) {
810+
const auto IsInTemplateString = [this](const FormatToken &Tok) {
811811
if (!Style.isJavaScript())
812812
return false;
813-
for (const FormatToken *Prev = &Tok; Prev; Prev = Prev->Previous) {
813+
for (const auto *Prev = &Tok; Prev; Prev = Prev->Previous) {
814814
if (Prev->is(TT_TemplateString) && Prev->opensScope())
815815
return true;
816816
if (Prev->is(TT_TemplateString) && Prev->closesScope())

0 commit comments

Comments
 (0)