[PATCH] D71199: [clang-tidy] New check readability-prefer-initialization-list
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 06:50:44 PST 2019
Eugene.Zelenko added a comment.
Clang-tidy also has //modernize-use-default-member-init//. Will be good idea to mention this check in documentation and otherwise as well as draw distinction (C++ version, coding guidelines, etc) in use cases.
================
Comment at: clang-tools-extra/clang-tidy/readability/PreferInitializationListCheck.cpp:66
+void PreferInitializationListCheck::registerMatchers(MatchFinder *Finder) {
+ Finder->addMatcher(cxxConstructorDecl().bind("ctor"), this);
+}
----------------
Will be good idea to check for C++.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:173
+
+ Finds member initializations in the constructor body which can be placed into
+ the initialization list instead.
----------------
Please synchronize with first statement in documentation.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71199/new/
https://reviews.llvm.org/D71199
More information about the cfe-commits
mailing list