Since Cpp Core Guidelines have accepted the change in the rules:
https://github.com/isocpp/CppCoreGuidelines/commit/3c90d590e138c3a1e4eb59234e410e00545326de
Also rename the check accordingly.
Paths
| Differential D148340
[clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default ClosedPublic Authored by carlosgalvezp on Apr 14 2023, 7:16 AM.
Details Summary Since Cpp Core Guidelines have accepted the change in the rules: Also rename the check accordingly.
Diff Detail
Event Timeline
carlosgalvezp added inline comments.
Comment Actions Just some minor issues in documentation.
This revision is now accepted and ready to land.Apr 14 2023, 12:29 PM
Comment Actions
That's a good point, I would agree that in that case it would not be confusing. Maybe you can bring it up for discussion to them? My proposal got accepted :)
Comment Actions Fix check ordering. Closed by commit rGeedbe81b1c6d: [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this… (authored by carlosgalvezp). · Explain WhyApr 15 2023, 3:10 AM This revision was automatically updated to reflect the committed changes.
carlosgalvezp added inline comments.
Revision Contents
Diff 513874 clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureDefaultWhenCapturingThisCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCaptureDefaultWhenCapturingThisCheck.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/MisleadingCaptureDefaultByValueCheck.h
clang-tools-extra/clang-tidy/cppcoreguidelines/MisleadingCaptureDefaultByValueCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-capture-default-when-capturing-this.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/misleading-capture-default-by-value.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-capture-default-when-capturing-this.cpp
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/misleading-capture-default-by-value.cpp
|
this name is hard to understand
I asked ChatGPT about it, and here are some other proposals: