[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-06-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the changes! In D80697#2062517 , @njames93 wrote: > There are a few reasons for using the virtual method: I think I'm missing something (or I didn't explain my intention well): > - It keeps everything contained in

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267161. njames93 marked 3 inline comments as done. njames93 added a comment. - Add back old constructors, one being deprecated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. There are a few reasons for using the virtual method: - It keeps everything contained in the one class. - In the case where options are needed it avoid extra work in the derived class. - It's consistent with how all base class checks handle the specifics of derived

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the suggestioned change. However, I think we can do somewhat simpler. What do you think of just providing a setter on the super class void setRule(Optional Rule) { this->Rule = std::move(Rule); } Subclasses will call `setRule` in their constructor body .

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 266957. njames93 added a comment. - Renamed makeRule to buildRule to avoid ambiguity with tooling::makeRule Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/ https://reviews.llvm.org/D80697 Files:

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a reviewer: ymandel. gribozavr2 added a subscriber: ymandel. gribozavr2 added a comment. @ymandel owns transformers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/ https://reviews.llvm.org/D80697

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Changed `TransformerClangTidyCheck` to have a virtual method generate the rule. This has the advantages of making handling