File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ class AvoidDefaultLambdaCaptureCheck : public ClangTidyCheck {
2626 std::optional<TraversalKind> getCheckTraversalKind () const override {
2727 return TK_IgnoreUnlessSpelledInSource;
2828 }
29+ bool isLanguageVersionSupported (const LangOptions &LangOpts) const override {
30+ return LangOpts.CPlusPlus11 ;
31+ }
2932};
3033
3134} // namespace clang::tidy::readability
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ Clang-Tidy Checks
377377 :doc: `readability-container-data-pointer <readability/container-data-pointer >`, "Yes"
378378 :doc: `readability-container-size-empty <readability/container-size-empty >`, "Yes"
379379 :doc: `readability-convert-member-functions-to-static <readability/convert-member-functions-to-static >`, "Yes"
380- :doc: `readability-avoid-default-lambda-capture <readability/avoid-default-lambda-capture >`,
380+ :doc: `readability-avoid-default-lambda-capture <readability/avoid-default-lambda-capture >`, "Yes"
381381 :doc: `readability-delete-null-pointer <readability/delete-null-pointer >`, "Yes"
382382 :doc: `readability-duplicate-include <readability/duplicate-include >`, "Yes"
383383 :doc: `readability-else-after-return <readability/else-after-return >`, "Yes"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Warns on default lambda captures (e.g. ``[&](){ ... }``, ``[=](){ ... }``).
77
88Captures can lead to subtle bugs including dangling references and unnecessary
99copies. Writing out the name of the variables being captured reminds programmers
10- and reviewers to know what is being captured.
10+ and reviewers about what is being captured.
1111
1212This check does not warn on variable-length array (VLA) captures. VLAs are not
1313ISO C++, and it is impossible to explicitly capture them as the syntax for doing
You can’t perform that action at this time.
0 commit comments