[PATCH] D71199: [clang-tidy] New check readability-prefer-initialization-list
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 05:04:55 PST 2019
baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: alexfh, aaron.ballman.
baloghadamsoftware added a project: clang-tools-extra.
Herald added subscribers: mgehre, Szelethus, rnkovacs, xazax.hun, mgorny.
Herald added a project: clang.
Finds member initializations in the constructor body which can be placed into the initialization list instead. This does not only improves the readability of the code but also affects positively its performance. Class-member assignments inside a control statement or following the first control statement are ignored.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D71199
Files:
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/PreferInitializationListCheck.cpp
clang-tools-extra/clang-tidy/readability/PreferInitializationListCheck.h
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability-prefer-initialization-list.rst
clang-tools-extra/test/clang-tidy/checkers/readability-prefer-initialization-list.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71199.232816.patch
Type: text/x-patch
Size: 12704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191209/f8309d05/attachment.bin>
More information about the cfe-commits
mailing list