[PATCH] D62340: [clang-tidy] In TransformerClangTidyCheck, require Explanation field.

2019-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 201256. ymandel added a comment. updated to use new version of `makeRule`; changed explanation text in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62340/new/ https://reviews.llvm.org/D62340 Files: cla

[PATCH] D62340: [clang-tidy] In TransformerClangTidyCheck, require Explanation field.

2019-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361647: [clang-tidy] In TransformerClangTidyCheck, require Explanation field. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D62412: [LibTooling] Fix unused-variable warning after r361647.

2019-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. A range-for was added in r361647 where the range variable was only used in an assertion. As a result, it warned for Release builds. This revision restructures the assertion to avoid the problem.

[PATCH] D62419: [LibTooling] Add `before` and `after` selectors for selecting point-ranges relative to nodes.

2019-05-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. The `before` and `after` selectors allow users to specify a zero-length range -- a point -- at the relevant location in an AST-node's source. Point ranges can be useful, for example, to insert a

[PATCH] D62419: [LibTooling] Add `before` and `after` selectors for selecting point-ranges relative to nodes.

2019-05-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked 2 inline comments as done. Closed by commit rL361955: [LibTooling] Add `before` and `after` selectors for selecting point-ranges… (authored by ymandel, committed by ). Herald added a project: LLVM. Herald adde

[PATCH] D62621: [LibTooling] Add insert/remove convenience functions for creating `ASTEdit`s.

2019-05-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. `change()` is an all purpose function; the revision adds simple shortcuts for the specific operations of inserting (before/after) or removing source. Repository: rG LLVM Github Monorepo htt

[PATCH] D62621: [LibTooling] Add insert/remove convenience functions for creating `ASTEdit`s.

2019-05-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 202026. ymandel added a comment. added comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62621/new/ https://reviews.llvm.org/D62621 Files: clang/include/clang/Tooling/Refactoring/Transformer.h clang/

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: alexfh. Herald added a subscriber: cfe-commits. `buildASTFromCodeWithArgs()` was creating a memory buffer referencing a stack-allocated string. This diff changes the implementation to copy the code string into the memory buffer so that said

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178468. ymandel added a comment. Change buildAST functions to take a StringRef instead of a Twine. In practice, code is almost never constructed on the fly using a Twine, so StringRef is simpler and avoids needing a copy when constructing the MemBuffer. Re

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178470. ymandel added a comment. Change header correspondingly. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h lib/Tooling/Tooling.cpp In

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178507. ymandel added a comment. Update test that was calling builAST with an actual Twine. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178651. ymandel added a comment. Convert other Twine-typed args to StringRef. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h lib/Tooling/To

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178653. ymandel added a comment. Adjust comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h lib/Tooling/Tooling.cpp unittests/Analys

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Alex, would you mind submitting this since I don't yet have submit privileges? I'll request them shortly, but I'd rather this go one in the meantime. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D5576

[PATCH] D67621: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. Adds two new combinators and corresponding tests to the RangeSelector library. - `ifBound` -- conditional evaluation of range-selectors, based on whether a given node id is bound in the match. - `e

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: mgorny. Herald added a project: clang. Introduces facilities for easily building source-code strings, including idiomatic use of the address-of, dereference and member-access operators (dot and arrow) an

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. ymandel added a parent revision: D67632: [libTooling] Introduce new library of source-code builders.. This revision add the `access` and `ifBound` combinators to the Stencil library: - `access` --

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 220488. ymandel added a comment. ran clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactoring/SourceCodeBuilders.h

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:77 + + if (Text.empty()) return std::string(); + // Add leading '*'. Eugene.Zelenko wrote: > Could return {}. Same in other

[PATCH] D67659: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: krasimir. Herald added a project: clang. AnnotatedLine has a tree structure, and things like the body of a lambda will be a child of the lambda expression. For example, [&]() { foo(a); }; will have an AnnotatedLine with a child: [&]()

[PATCH] D67659: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Format/Format.cpp:1420 -for (auto &Line : AnnotatedLines) { - if (Line->Affected) { -cleanupRight(Line->First, tok::comma, tok::comma); -cleanupRight(Line->Fi

[PATCH] D67659: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 220504. ymandel added a comment. Fixed auto use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67659/new/ https://reviews.llvm.org/D67659 Files: clang/lib/Format/Format.cpp clang/unittests/Format/CleanupTe

[PATCH] D67659: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372129: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D67744: [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit constructors.

2019-09-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: xazax.hun. Herald added a project: clang. After revision 370919, this check incorrectly flags certain cases of implicit constructors. Specifically, if an argument is annotated with an argument-comment an

[PATCH] D67744: [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit constructors.

2019-09-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372317: [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit… (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 220901. ymandel added a comment. Added parens operator; cleaned comments and api a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Too

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thanks for the review! Agreed on all points and then some -- next revision will have a bunch of cleanups. I think the only major issue is the return type. See below. Comment at: clang/lib/Tooling/Refactoring/

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221041. ymandel added a comment. address comments and some general cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactor

[PATCH] D67621: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221050. ymandel marked 2 inline comments as done. ymandel added a comment. reordered decls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67621/new/ https://reviews.llvm.org/D67621 Files: clang/include/clang/

[PATCH] D67621: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/lib/Tooling/Refactoring/RangeSelector.cpp:320 + }; +} gribozavr wrote: > May I ask to keep the implementation order consistent with the header file? Moved the decl in the header to match the ordering in the implem

[PATCH] D67621: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221052. ymandel added a comment. reordered tests to match as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67621/new/ https://reviews.llvm.org/D67621 Files: clang/include/clang/Tooling/Refactoring/Rang

[PATCH] D67621: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372410: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to co

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221103. ymandel added a comment. converted builders to return optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactoring/

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372595: [libTooling] Introduce new library of source-code builders. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221312. ymandel added a comment. update to new signature for builders (`Optional`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67633/new/ https://reviews.llvm.org/D67633 Files: clang/include/clang/Tooling/

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221316. ymandel added a comment. addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67633/new/ https://reviews.llvm.org/D67633 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. Thanks for the review! Comment at: clang/lib/Tooling/Refactoring/Stencil.cpp:195 +using AccessOp = StencilPartImpl; +using IfBoundOp = StencilPartImpl; } // namespace gribozavr wrote: > These t

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL372605: [libTooling] Add `access` and `ifBound` combinators to Stencil library. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D67961: [libTooling] Introduce the MatchConsumer abstraction

2019-09-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This revision introduces a separate (small) library for the `MatchConsumer` abstraction: computations over AST match results. This abstraction is central to the Transformer framework, and there dese

[PATCH] D67961: [libTooling] Introduce the MatchConsumer abstraction

2019-09-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221531. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67961/new/ https://reviews.llvm.org/D67961 Files: clang/include/clang/Tooling/Refactoring/MatchConsumer.h clang/i

[PATCH] D67969: [libTooling] Add `run` combinator to Stencils.

2019-09-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This revision adds `run`, a StencilPart that runs a user-defined function that computes a result over `MatchFinder::MatchResult`. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D67

[PATCH] D67969: [libTooling] Add `run` combinator to Stencils.

2019-09-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221554. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67969/new/ https://reviews.llvm.org/D67969 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/lib/Too

[PATCH] D67973: [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED

2019-09-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. Currently, some tests use homegrown matchers to handle `llvm::Expected` values. This revision standardizes on EXPECT_THAT_EXPECTED and `HasValue`. Repository: rG LLVM Github Monorepo https:/

[PATCH] D67969: [libTooling] Add `run` combinator to Stencils.

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:181 +/// This supports user-defined extensions to the Stencil language. +StencilPart run(MatchConsumer C); + gribozavr wrote: >

[PATCH] D67961: [libTooling] Introduce the MatchConsumer abstraction

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221733. ymandel marked 3 inline comments as done. ymandel added a comment. addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67961/new/ https://reviews.llvm.org/D67961 Files: clang/include/cl

[PATCH] D67961: [libTooling] Introduce the MatchConsumer abstraction

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/MatchConsumer.h:27 + +/// A central abstraction of the Transformer framework is computation over the +/// results of a match (represented by \c MatchFinder

[PATCH] D67961: [libTooling] Introduce the MatchConsumer abstraction

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372870: [libTooling] Introduce the MatchConsumer abstraction (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:/

[PATCH] D67969: [libTooling] Add `run` combinator to Stencils.

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added a comment. Thanks for the review! Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:181 +/// This supports user-defined extensions to the Stencil language. +StencilPart run(MatchConsumer C); +

[PATCH] D67973: [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372918: [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D67969: [libTooling] Add `run` combinator to Stencils.

2019-09-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL372936: [libTooling] Add `run` combinator to Stencils. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 222177. ymandel added a comment. Herald added a subscriber: jfb. reworked to follow same scheme as clang-tidy version, per discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66652/new/ https://reviews.ll

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D66652#1654585 , @gribozavr wrote: > > So, I plan to rework this into two revisions: one to match > > https://reviews.llvm.org/D66676 (and keep the tests esssentially as they > > are) and one to add getRuleMatchLoc for future

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373093: [libTooling] Transformer: refine `SourceLocation` specified as anchor of… (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This revision adds three new Stencil combinators: - `expression`, which idiomatically constructs the source for an expression, including wrapping the expression's source in parentheses if needed. -

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 222889. ymandel marked 2 inline comments as done. ymandel added a comment. responded to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68315/new/ https://reviews.llvm.org/D68315 Files: clang/include/

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:149 /// \returns the source corresponding to the selected range. StencilPart selection(RangeSelector Selector); gribozavr wr

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:149 /// \returns the source corresponding to the selected range. StencilPart selection(RangeSelector Selector); gribozavr wr

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL373593: [libTooling] Add various Stencil combinators for expressions. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. `toString` generates a string representation of the stencil. Patch by Harshal T. Lehri. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223566. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/lib/Too

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223573. ymandel added a comment. comment tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/lib/T

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223619. ymandel added a comment. fix comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/lib/Tool

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. The tests broke the build on some platforms because of the use of raw strings in macros. Fixing now... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68574/new/ https://reviews.llvm.org/D68574 ___

[PATCH] D68574: [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373916: [libTooling] Add `toString` method to the Stencil class (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D68637: [libTooling] Move Transformer files to their own directory/library.

2019-10-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: mgorny. Herald added a project: clang. The Transformer library has been growing inside of lib/Tooling/Refactoring. However, it's not really related to anything else in that directory. This revision moves

[PATCH] D68637: [libTooling] Move Transformer files to their own directory/library.

2019-10-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223840. ymandel added a comment. update header guards Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68637/new/ https://reviews.llvm.org/D68637 Files: clang-tools-extra/clang-tidy/utils/CMakeLists.txt clang

[PATCH] D68637: [libTooling] Move Transformer files to their own directory/library.

2019-10-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 223856. ymandel added a comment. update another cmakelists file (uncovered by linking for shared libs) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68637/new/ https://reviews.llvm.org/D68637 Files: clang-to

[PATCH] D68637: [libTooling] Move Transformer files to their own directory/library.

2019-10-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfbdf83521b17: [libTooling] Move Transformer files to their own directory/library. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68637/

[PATCH] D68637: [libTooling] Move Transformer files to their own directory/library.

2019-10-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Tooling/Transformer/CMakeLists.txt:3 + +add_clang_library(clangTransformer + RangeSelector.cpp thakis wrote: > All the other libs in lib/Tooling/Foo are called clangTo

[PATCH] D68795: [libTooling] Introduce a single, "main" header file for Transformer.

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: jfb. Herald added a project: clang. Split the existing `Transformer.h` into two new files, with more focused purpose: `RewriteRule.h` and `TransformerTool.h`. The file `Transformer.h` is repurposed to co

[PATCH] D68795: [libTooling] Introduce a single, "main" header file for Transformer.

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Transformer/Transformer.h:28 +// also update their code to reference `TransformerTool`. +#include "clang/Tooling/Transformer/TransformerTool.h" +// Temporary alias to

[PATCH] D68795: [libTooling] Introduce a single, "main" header file for Transformer.

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 224414. ymandel added a comment. Herald added a subscriber: mgorny. Removed umbrella-header, as per discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68795/new/ https://reviews.llvm.org/D68795 Files:

[PATCH] D68795: [libTooling] Introduce a single, "main" header file for Transformer.

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Transformer/Transformer.h:28 +// also update their code to reference `TransformerTool`. +#include "clang/Tooling/Transformer/TransformerTool.h" +// Temporary alias to

[PATCH] D68825: [libTooling] Change Stencil equality to use `toString()`

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. ymandel edited the summary of this revision. Removes the `isEqual` method from StencilPartInterface and modifies equality to use the string representation returned by the `toString` method for compar

[PATCH] D68825: [libTooling] Change Stencil equality to use `toString()`

2019-10-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 224536. ymandel added a comment. removed `operator==` and updated tests accordingly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68825/new/ https://reviews.llvm.org/D68825 Files: clang/include/clang/Toolin

[PATCH] D68825: [libTooling] Change Stencil equality to use `toString()`

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf2438ec1309: [libTooling] Change Stencil equality to use `toString()` (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68825/new/ https

[PATCH] D68795: [libTooling] Move `RewriteRule` abstraction into its own header and impl.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. updated title & description to match the changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68795/new/ https://reviews.llvm.org/D68795 ___ cfe-commits mailing list cfe-comm

[PATCH] D68795: [libTooling] Move `RewriteRule` abstraction into its own header and impl.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe38c36b7b0ab: [libTooling] Move `RewriteRule` abstraction into its own header and impl. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D68876: [libTooling] Group all Transformer combinators in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This revision introduces a new namespace, `clang::tooling::transformer`, to hold the combinators that together compose the embedded "DSL" provided by Transformer. It moves all Transformer-related co

[PATCH] D68876: [libTooling] Group all Transformer combinators in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D68876#1706131 , @gribozavr wrote: > WDYT about `clang::transformer`? I don't see much point in the intermediate > namespace. However, LGTM either way. Thanks for the review. I prefer `clang::transformer` but wasn't sure abou

[PATCH] D68876: [libTooling] Group all Transformer combinators in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I'm now starting to doubt the split into transformer (for combinators) and tooling (for the type decls). I checked and `ast_matchers` contains both. What do you think of my just putting all of the Transformer types + combis in the single `clang::transformer` namespace

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 224650. ymandel added a comment. moved all decls to clang::transformer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68876/new/ https://reviews.llvm.org/D68876 Files: clang/include/clang/Tooling/Transformer

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 224651. ymandel edited the summary of this revision. ymandel added a comment. fix using decl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68876/new/ https://reviews.llvm.org/D68876 Files: clang/include/cla

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 224653. ymandel added a comment. remove stray newline and include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68876/new/ https://reviews.llvm.org/D68876 Files: clang/include/clang/Tooling/Transformer/Matc

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8bb47cd8c30c: [libTooling] Put all Transformer declarations in a single namespace. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68876

[PATCH] D69036: [libTooling] Fix r374962: add more Transformer forwarding decls.

2019-10-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: alexfh. Herald added a project: clang. The move to a new, single namespace in r374962 left out some type definitions from the old namespace and resulted in one naming conflict (`text`). This revision adds aliases for those definitions and r

[PATCH] D69036: [libTooling] Fix r374962: add more Transformer forwarding decls.

2019-10-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc14f1ea25e05: [libTooling] Fix r374962: add more Transformer forwarding decls. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69036/new

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. This should be fixed by r375003. Please let me know if that's not the case. In D68876#1711227 , @aprantl wrote: > This broke the modular build since some symbols are now ambiguous within the > same Clang module.' > > http://green

[PATCH] D68876: [libTooling] Put all Transformer declarations in a single namespace.

2019-10-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D68876#1711576 , @aprantl wrote: > It looks like it's still failing: > http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/2649/console That line was fixed in the revision I mentioned: https://reviews.llvm.org/rL375003

[PATCH] D69184: [libTooling] Introduce general combinator for fixed-value `MatchConsumer`s.

2019-10-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This revision generalizes the (deprecated) `clang::tooling::text` combinator to a `value` combinator, which works for any type. Aside from being more general, it resolves the naming confict between `

[PATCH] D69184: [libTooling] Introduce general combinator for fixed-value `MatchConsumer`s.

2019-10-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D69184#1715256 , @gribozavr wrote: > What are the use cases for non-text values? > > I like the name `text` much better... If the name conflict is the issue, I > think you could rename it to `toText` -- it would even read more

[PATCH] D69184: [libTooling] Introduce general combinator for fixed-value `MatchConsumer`s.

2019-10-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D69184#1718427 , @ymandel wrote: > In D69184#1715256 , @gribozavr wrote: > > > What are the use cases for non-text values? > > > > I like the name `text` much better... If the name confli

[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. LGTM, but leaving for one of the other reviewers to give you the official "Accept Revision". Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:72 + binaryOperator(hasOperatorName("=="), +

[PATCH] D80239: [libTooling] In Transformer, allow atomic changes to span multiple files.

2020-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added a comment. Thanks for the review. Comment at: clang/lib/Tooling/Transformer/Transformer.cpp:65 - for (const auto &I : Case.AddedIncludes) { -auto &Header = I.first; -switch (I.second) { -case transformer::In

[PATCH] D80239: [libTooling] In Transformer, allow atomic changes to span multiple files.

2020-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 266190. ymandel marked an inline comment as done. ymandel added a comment. Herald added subscribers: llvm-commits, dmgreen. Herald added a project: LLVM. adds fixme comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D80239: [libTooling] In Transformer, allow atomic changes to span multiple files.

2020-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 266191. ymandel added a comment. fixes rebase mistake in previous diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80239/new/ https://reviews.llvm.org/D80239 Files: clang/lib/Tooling/Transformer/Transforme

[PATCH] D80239: [libTooling] In Transformer, allow atomic changes to span multiple files.

2020-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGff2743bf047d: [libTooling] In Transformer, allow atomic changes to span multiple files. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D80606: [libTooling][NFC] Demo bug introduced in D72534.

2020-05-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: hokein, gribozavr. Herald added a project: clang. DO NOT PUSH. This patch includes two new tests that demo a bug introduced into Transformer by https://reviews.llvm.org/D72534. This patch is intended only as a demonstration of the problem.

[PATCH] D80603: add isAtPosition narrowing matcher for parmVarDecl

2020-05-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7018 +AST_MATCHER_P(clang::ParmVarDecl, isAtPosition, unsigned, N) { + return parmVarDecl(hasAncestor(functionDecl( + hasParameter(N, parmVarDecl().bind("this_decl"))

[PATCH] D80606: [libTooling][NFC] Demo bug introduced in D72534.

2020-05-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D80606#2057136 , @steveire wrote: > It might make sense for now (in order to unblock you) to make the > `Transformer` library explicitly require the `AsIs` mode. I am not so > familiar with the transformer library, but I think

<    1   2   3   4   5   6   7   8   9   10   >