malcolm.parsons updated this revision to Diff 72181.
malcolm.parsons added a comment.
Don't remove init of const members.
Do remove calls to constructors that introduce cleanups.
https://reviews.llvm.org/D24339
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityT
malcolm.parsons updated this revision to Diff 71802.
malcolm.parsons added a comment.
Handle delegating and base class constructors
https://reviews.llvm.org/D24339
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/Redundan
malcolm.parsons updated this revision to Diff 71622.
malcolm.parsons added a comment.
Herald added a subscriber: mgorny.
Handle unions and templated classes.
Add FixItHints (depends on https://reviews.llvm.org/D24572).
https://reviews.llvm.org/D24339
Files:
clang-tidy/readability/CMakeLists.t
alexfh added a comment.
In https://reviews.llvm.org/D24339#537488, @malcolm.parsons wrote:
> How do I add FixIt hints?
> They should be simple removals, but how do I decide whether to remove the
> following comma, preceding comma or preceding colon?
Just remove the entry and leave the comma a
malcolm.parsons marked 15 inline comments as done.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34
@@ +33,3 @@
+
+ if (Construct->getNumArgs() == 0 ||
+ Construct->getArg(0)->isDefaultArgument()) {
Other forms of initialization are not CXX
malcolm.parsons updated this revision to Diff 70797.
malcolm.parsons added a comment.
Improve comments
Improve doc
Add tests
Simplify implementation
https://reviews.llvm.org/D24339
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/rea
malcolm.parsons added a comment.
How do I add FixIt hints?
They should be simple removals, but how do I decide whether to remove the
following comma, preceding comma or preceding colon?
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33
@@ +32,3 @@
+ const auto
aaron.ballman added inline comments.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34
@@ +33,3 @@
+ const auto *Construct =
Result.Nodes.getNodeAs("construct");
+ const auto arguments = Construct->arguments();
+
sbenza wrote:
> Prazek wrote:
>
sbenza added inline comments.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33
@@ +32,3 @@
+ const auto *Init = Result.Nodes.getNodeAs("init");
+ const auto *Construct =
Result.Nodes.getNodeAs("construct");
+ const auto arguments = Construct->arguments();
---
Eugene.Zelenko added inline comments.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:36
@@ +35,3 @@
+
+ using std::begin;
+ using std::end;
begin() and end() are not used extensively. Why not to use std::?
Repository:
rL LLVM
https://review
Prazek added inline comments.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34
@@ +33,3 @@
+ const auto *Construct =
Result.Nodes.getNodeAs("construct");
+ const auto arguments = Construct->arguments();
+
Arguments (upper case)
Repository:
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
I think will be good idea to add cases when member is initialized in
declaration and constructor, with same and different values.
Comment at: docs/clang-tidy/checks/readability-redundant-member-i
12 matches
Mail list logo