[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-19 Thread Mitchell via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG980653621ef5: [clang-tidy] Give readability-redundant-member-init an option… (authored by mitchell-stellar). Changed prior to commit: https://reviews.llvm.org/D69145?vs=229934=230077#toc Repository:

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. Thank you, looks good to me. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/ https://reviews.llvm.org/D69145

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-18 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. Thanks @lebedev.ri for taking the time to think this through and reply. All that makes sense, so I've changed the default to `0`. In addition to adding it to the ReleaseNotes, once clang-tidy 10 is released I'll reply to a StackOverflow question about this error with

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-18 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc updated this revision to Diff 229934. poelmanc edited the summary of this revision. poelmanc added a comment. Switch default to `0`. Add Release Note with some detail to increase the chances of someone finding this with an Internet search on the error message. Repository: rCTE

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D69145#1750529 , @aaron.ballman wrote: > In D69145#1748733 , @lebedev.ri > wrote: > > > In D69145#1748716 , @poelmanc > > wrote: > > > > >

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D69145#1748733 , @lebedev.ri wrote: > In D69145#1748716 , @poelmanc wrote: > > > In D69145#1715611 , @mgehre wrote: > > > > > Exactly due

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-16 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a subscriber: mgehre. poelmanc added a comment. In D69145#1715611 , @mgehre wrote: > Exactly due to the issue you are fixing here, we ended up disabling the > complete check because we didn't want to live with the warnings it produced >

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D69145#1748716 , @poelmanc wrote: > In D69145#1715611 , @mgehre wrote: > > > Exactly due to the issue you are fixing here, we ended up disabling the > > complete check because we

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-11-08 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. In D69145#1725026 , @malcolm.parsons wrote: > I like that this check warns about copy constructors that don't copy. > The warning can be suppressed with a NOLINT comment if not copying is > intentional. Thanks for the

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-29 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I like that this check warns about copy constructors that don't copy. The warning can be suppressed with a NOLINT comment if not copying is intentional. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-29 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc updated this revision to Diff 226847. poelmanc added a comment. Changed default to 1, updated help accordingly, and removed an extraneous set of braces around a one-line statement. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D69145#1720254 , @poelmanc wrote: > What do @malcolm.parsons, @alexfh, @hokein, @aaron.ballman, @lebedev.ri think > of @mgehre's suggestion to enable `IgnoreBaseInCopyConstructors` as the > default setting, so gcc users

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-24 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. What do @malcolm.parsons, @alexfh, @hokein, @aaron.ballman, @lebedev.ri think of @mgehre's suggestion to enable `IgnoreBaseInCopyConstructors` as the default setting, so gcc users won't experience build errors and think "clang-tidy broke my code!" I could go either

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-21 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc updated this revision to Diff 225897. poelmanc added a comment. Rebase to latest master (tests moved into new "checkers" directory.) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/ https://reviews.llvm.org/D69145 Files:

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-21 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc marked 2 inline comments as done. poelmanc added a comment. Addressed these the other day but failed to check the "Done" boxes. Done! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/ https://reviews.llvm.org/D69145

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. In D69145#1715614 , @lebedev.ri wrote: > So https://godbolt.org/z/qzjU-C > This feels like gcc being overly zealous, i'm not sure what it says with > that warning. I'd agree, while copy constructors //usually// need to copy

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc updated this revision to Diff 225764. poelmanc added a comment. Addressed @mgehre's feedback: - Ran clang-format - Included gcc, -Wextra, -Werror=extra, and the full text of the warning/error message to aid in searchability, so people can find this option when they encounter the

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc added a comment. In D69145#1715611 , @mgehre wrote: > Exactly due to the issue you are fixing here, we ended up disabling the > complete check because we didn't want to live with the warnings it produced > on -Wextra. > Therefore, I'm actually

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. So https://godbolt.org/z/qzjU-C This feels like gcc being overly zealous, i'm not sure what it says with that warning. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69145/new/ https://reviews.llvm.org/D69145

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Exactly due to the issue you are fixing here, we ended up disabling the complete check because we didn't want to live with the warnings it produced on -Wextra. Therefore, I'm actually strongly in favor to enable the option by default. When others see that clang-tidy

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-19 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.cpp:55 const auto *Construct = Result.Nodes.getNodeAs("construct"); + const auto* ConstructorDecl = Result.Nodes.getNodeAs( "constructor" ); +

[PATCH] D69145: Give readability-redundant-member-init an option IgnoreBaseInCopyConstructors to avoid breaking code with gcc -Werror=extra

2019-10-17 Thread Conrad Poelman via Phabricator via cfe-commits
poelmanc created this revision. poelmanc added reviewers: malcolm.parsons, alexfh, hokein, aaron.ballman. poelmanc added a project: clang-tools-extra. Herald added subscribers: cfe-commits, mgehre. Herald added a project: clang. readability-redundant-member-init removes redundant / unnecessary