[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 07:20:29 PDT 2020
baloghadamsoftware updated this revision to Diff 285366.
baloghadamsoftware added a comment.
Since no better idea cam to my mind, in this version I check whether `modernize-use-default-member-init` is enabled. If it is, then we issue a warning and suggest a fix that uses default member initializer. We also take into account the option for that checker whether we should use brackets or assignment. This checker has no options now. If the other checker is not enabled, we always warn and suggest fix to use constructor member initializer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71199/new/
https://reviews.llvm.org/D71199
Files:
clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-prefer-member-initializer.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71199.285366.patch
Type: text/x-patch
Size: 29097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200813/a5da3f79/attachment-0001.bin>
More information about the cfe-commits
mailing list