[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-20 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284742: [clang-tidy] Add check 'readability-redundant-member-init' (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D24339?vs=74769&id=75311#toc Repository: rL LLVM h

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74769. malcolm.parsons added a comment. Use ignoringImplicit https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantMemberInitCheck.cpp cl

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D24339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73479. malcolm.parsons added a comment. Add test for initializing a union member. Add test for multiple inheritance. https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. > aaron.ballman wrote in readability-redundant-member-init.cpp:162 > Missing a test for `union` member initializers. Also, a test that multiple > inheritance doesn't cause a fixit malfunction would be nice. Note that all the fixits malfunction until https:

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-04 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. > readability-redundant-member-init.cpp:162 > + const S f; > +}; Missing a test for `union` member initializers. Also, a test that multiple inheritance doesn't cause a fixit malfunction would be nice. https://reviews.llvm.org/D24339

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73260. malcolm.parsons added a comment. Herald added a subscriber: modocache. Don't warn for trivially default constructable members https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityT

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-22 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-19 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-16 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-14 Thread Alexander Kornienko via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-09 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-09 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Malcolm Parsons via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Aaron Ballman via cfe-commits
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: >

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Samuel Benzaquen via cfe-commits
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(); ---

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Eugene Zelenko via cfe-commits
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

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Piotr Padlewski via cfe-commits
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:

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Eugene Zelenko via cfe-commits
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