Skip to content

Commit e4ffb48

Browse files
committed
[NFC] Explicit capture in lambda
1 parent d92f768 commit e4ffb48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/clang-tidy/modernize/UseStructuredBindingCheck.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,9 @@ void UseStructuredBindingCheck::check(const MatchFinder::MatchResult &Result) {
339339
}
340340

341341
const auto *CFRS = Result.Nodes.getNodeAs<CXXForRangeStmt>(ForRangeStmtName);
342-
auto DiagAndFix = [&](SourceLocation DiagLoc, SourceRange ReplaceRange,
343-
TransferType TT = TT_ByVal) {
342+
auto DiagAndFix = [&DS1, &DS2, &FirstVar, &SecondVar, &CFRS,
343+
this](SourceLocation DiagLoc, SourceRange ReplaceRange,
344+
TransferType TT = TT_ByVal) {
344345
StringRef Prefix;
345346
switch (TT) {
346347
case TT_ByVal:

0 commit comments

Comments
 (0)