File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 14
14
using namespace clang ::tidy::readability;
15
15
16
16
static std::optional<std::string>
17
- generateImplicitCaptureText (const clang::LambdaCapture &Capture) {
17
+ generateCaptureText (const clang::LambdaCapture &Capture) {
18
18
if (Capture.capturesThis ()) {
19
19
return Capture.getCaptureKind () == clang::LCK_StarThis ? " *this" : " this" ;
20
20
}
@@ -61,14 +61,8 @@ void AvoidDefaultLambdaCaptureCheck::check(
61
61
62
62
std::vector<std::string> AllCaptures;
63
63
64
- for (const auto &Capture : Lambda->explicit_captures ()) {
65
- if (const auto CaptureText = generateImplicitCaptureText (Capture)) {
66
- AllCaptures.push_back (CaptureText.value ());
67
- }
68
- }
69
-
70
- for (const auto &Capture : Lambda->implicit_captures ()) {
71
- if (const auto CaptureText = generateImplicitCaptureText (Capture)) {
64
+ for (const auto &Capture : Lambda->captures ()) {
65
+ if (const auto CaptureText = generateCaptureText (Capture)) {
72
66
AllCaptures.push_back (CaptureText.value ());
73
67
}
74
68
}
You can’t perform that action at this time.
0 commit comments