[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D60408#1463909 , @ilya-biryukov wrote: > Sorry for the delay. > There seem to be a few changes that are unrelated to the actual patch. Could > we separate various non-functional changes (moving code around, etc.) into a >

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194886. ymandel added a comment. More code movement (putting things back). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408 Files:

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194883. ymandel marked 2 inline comments as done. ymandel added a comment. Restore code ordering for unrelated code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-11 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

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

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the review. I've changed most of the things with only a few open questions. PTAL. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:45 + /// Evaluates this part to a string and appends it to `result`. + virtual llvm::Error

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194550. ymandel added a comment. deleted some stray comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files:

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194549. ymandel marked 13 inline comments as done. ymandel added a comment. Responded to comments and added wrapper for Stencil::cat in stencil namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194157. ymandel added a comment. Add `operator()` to Stencil for compatability with TextGenerator. Stencil is technically independent of Transformer. However, Transformers replacements and explanations take a generic std::function (there abbreviated as

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a subscriber: jfb. Herald added a project: clang. This revision allows users to specify independent changes to multiple (related) sections of the input. Previously, only a single section of input could be

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193906. ymandel added a comment. Adjust to use SourceCode instead of FixIt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files:

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357768: [LibTooling] Add Transformer, a library for source-to-source transformations. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

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

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357764: [LibTooling] Add SourceCode library for functions relating to source-codeā€¦ (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193865. ymandel added a comment. Fix trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files: clang/include/clang/Tooling/FixIt.h

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193861. ymandel added a comment. Delete unused function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files: clang/include/clang/Tooling/FixIt.h

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193750. ymandel added a comment. Rebasing to parent D60269 so that diffs show correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193748. ymandel added a comment. Switch from using FixIt to SourceCode, as solution to circular dependency problem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193741. ymandel added a comment. Various tweaks to get tests compiling/passing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files:

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193736. ymandel added a comment. Herald added a subscriber: mgorny. Update CMakeLists.txt and rename (misnamed) test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193735. ymandel added a comment. Add tests for SourceCode and remove corresponding tests from FixIt tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60269/new/ https://reviews.llvm.org/D60269 Files:

[PATCH] D60269: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: ilya-biryukov, ioeric. Herald added a project: clang. Introduces a utility library in Refactoring/ to collect routines related to source-code manipulation. In this change, we move "extended-range" functions from the FixIt library (in

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D59376#1454768 , @ilya-biryukov wrote: > Per @ioeric's suggestion: why not move the helper into > `Tooling/Refactoring/ExtendedRange.h`? > If it's in `ToolingRefactoring`, both stencil and transformer can access it. > > For

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D59376#1454617 , @ilya-biryukov wrote: > Keeping it **only** in the cpp file also LG if we don't plan to have other > usages for now, but please remove the version from `FixIt.h` The Stencil library will need this as well

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193584. ymandel added a subscriber: ABataev. ymandel added a comment. Sever dependency of clangToolingRefactor on clangTooling via FixIt. Transformer used FixIt, which causes a problematic dependency. This diff copies the (minimal) code from FixIt to

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Ilya, this diff fixes the breakage. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 ___ cfe-commits mailing list

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel reopened this revision. ymandel added a comment. This revision is now accepted and ready to land. Reopening to fix the breakage caused by previous attempt at commit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376

[PATCH] D60213: Add clangTooling dependency to fix the build.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D60213#1453516 , @ABataev wrote: > Nope, it won't work. There is a cyclic dependency, unfortunately. > clangTooling depends on clangToolingRefactor already. You need to revert your > commit and refactor it to remove the

[PATCH] D60213: Add clangTooling dependency to fix the build.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. Fixes https://reviews.llvm.org/D59371, which broke the build for shared libraries. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D60213 Files:

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193498. ymandel added a comment. Remove noisy default-defined constructors/operators Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files:

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193496. ymandel added a comment. Sever dependency on NodeId and some general cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files:

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC357576: [LibTooling] Add Transformer, a library for source-to-source transformations. (authored by ymandel, committed by ). Changed prior to commit: https://reviews.llvm.org/D59376?vs=193306=193480#toc

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I've removed the dependency on NodeIds given our (off thread) discussions regarding their overall value and appropriateness in clang::tooling vs clang::ast_matchers. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193306. ymandel added a comment. Remove dependency on NodeIds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 Files:

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thank you for the extremely helpful and detailed review!! Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:110 + // constructed with the builder class. + static constexpr char RootId[] = "___root___"; +};

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193260. ymandel marked 3 inline comments as done. ymandel added a comment. Small tweaks in response to comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376 Files:

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:70 +// +// * Explanation: explanation of the rewrite. +// ilya-biryukov wrote: > ymandel wrote: > > ilya-biryukov wrote: > > > NIT: maybe mention what it should be

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 193219. ymandel marked 28 inline comments as done. ymandel added a comment. Assorted changes in response to comments. Most notably, dropped constructor from RewriteRule, in favor of putting meaningful initialization in the builder. Repository: rG LLVM

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 19 inline comments as done. ymandel added a comment. Thanks for (more) helpful comments. I think the code is a lot better now than it started out. :) Also, converted `RewriteRule` to a simple struct as per our discussion. Comment at:

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192889. ymandel marked an inline comment as done. ymandel added a comment. - Assorted changes in response to comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/ https://reviews.llvm.org/D59376

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the detailed review and really helpful comments! Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:38 +/// @{ +using ast_matchers::CXXCtorInitializerMatcher; +using ast_matchers::DeclarationMatcher;

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192623. ymandel marked 26 inline comments as done. ymandel added a comment. Adjusted test to cover case discussed in comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192619. ymandel marked 2 inline comments as done. ymandel added a comment. Simplified TextGenerator, changed namespace handling, collapsed verifyTarget() into getTarget(), and other changes in response to comments. Repository: rG LLVM Github Monorepo

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-26 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/Transformer.h:89 + /// relevant name, not including qualifiers. + Name, +}; ilya-biryukov wrote: > ymandel wrote: > > ilya-biryukov

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192267. ymandel marked 5 inline comments as done. ymandel added a comment. - Remove lvalue-ref overloads in builder - add StringRef overloads for TextGenerator-taking methods - constrain Name targeting for ctor initializers to explicitly written

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-03-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. gentle ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. gentle ping... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59329/new/ https://reviews.llvm.org/D59329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 10 inline comments as done. ymandel added a comment. Addressed the most major comments. Still working on some smaller ones. PTAL. Thanks! Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:54 +/// boolean expression language for constructing

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 192172. ymandel marked an inline comment as done. ymandel added a comment. Split RewriteRule into two classes, remove support for where clause, support multi-token targets, and add corresponding tests. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Working on the new version now. Will note with "PTAL" once that's ready. Sorry that wasn't clear in earlier responses. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59376/new/

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:135 +// \endcode +class RewriteRule { +public: ilya-biryukov wrote: > ymandel wrote: > > ilya-biryukov wrote: > > > Maybe

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:54 +/// boolean expression language for constructing filters. +class MatchFilter { +public: ilya-biryukov wrote: >

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jdoerfert, jfb, mgorny. Herald added a project: clang. ymandel added a parent revision: D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.. Adds a basic

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190683. ymandel added a comment. Build fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190679. ymandel added a comment. "Revert" to original diff. This undoes the previous diff, which associated with the wrong revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59329/new/

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190675. ymandel added a comment. Herald added a subscriber: jdoerfert. Build-related fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59329/new/ https://reviews.llvm.org/D59329 Files:

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added subscribers: jdoerfert, jfb, mgorny. This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes. Given a match

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added subscribers: jfb, mgorny. The standard matcher API uses StringRefs to identify bound nodes. This patch introduces a strong type thats allows distinguishing ids from arbitrary text

[PATCH] D58556: [LibTooling] Add retrieval of extended AST-node source to FixIt library

2019-03-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356095: [LibTooling] Add retrieval of extended AST-node source to FixIt library (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-03-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190039. ymandel marked an inline comment as done. ymandel edited the summary of this revision. ymandel added a comment. Remove unneeded includes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58556/new/

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-03-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190038. ymandel added a comment. Herald added a project: clang. Removed unneeded includes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56851/new/ https://reviews.llvm.org/D56851 Files:

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-03-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 7 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/FixIt.h:73 +// context. In contrast with \p getText(), this function selects a source range +// "automatically", extracting text that a reader might intuitively

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-03-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190037. ymandel marked an inline comment as done. ymandel edited the summary of this revision. ymandel added a comment. This update significantly simplifies the change. It removes any "smarts", instead allowing the user to request the extension of the

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-03-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 5 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/FixIt.h:73 +// context. In contrast with \p getText(), this function selects a source range +// "automatically", extracting text that a reader might intuitively

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-02-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/FixIt.h:60 +// future to include more associated text (like comments). +CharSourceRange getSourceRangeAuto(const Stmt , ASTContext ); + ilya-biryukov

[PATCH] D58556: [LibTooling] Add "smart" retrieval of AST-node source to FixIt library

2019-02-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added a subscriber: jdoerfert. Introduces variants of `getText` and `getSourceRange` that extract the source text of an AST node based on contextual considerations. This revision

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-02-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-02-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354133: Add tests for assorted `CXXMemberCallExpr` matchers. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-02-15 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 187003. ymandel added a comment. Herald added a project: clang. Sync to head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56850/new/ https://reviews.llvm.org/D56850 Files:

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-02-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353532: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers. (authored by ymandel, committed by ). Changed prior to commit: https://reviews.llvm.org/D56849?vs=185977=185978#toc

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-02-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 185977. ymandel added a comment. Sync with head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-02-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Alex, can you please submit this? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 ___ cfe-commits mailing list

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-02-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 185309. ymandel added a comment. Herald added a project: clang. Sync'd with master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 Files:

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-02-05 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Aaron, Alex, any additional comments on this change? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56850/new/ https://reviews.llvm.org/D56850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-28 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 183591. ymandel added a comment. Contrast to thisPointerType with explicit examples. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56851/new/ https://reviews.llvm.org/D56851 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 183582. ymandel added a comment. Remove unneeded qualifiers and clarify constrast with `thisPointerType`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56851/new/ https://reviews.llvm.org/D56851 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, +

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:558 + int m; + int f(X x) { return m; } +}; steveire wrote: > Are we missing a matcher that would reach the type of X in this case? >

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182933. ymandel marked 3 inline comments as done. ymandel added a comment. Extended test of `hasObjectExpression`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56850/new/ https://reviews.llvm.org/D56850 Files:

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182919. ymandel marked an inline comment as done. ymandel added a comment. Remove unnecessary expectation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56850/new/ https://reviews.llvm.org/D56850 Files:

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-01-22 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182918. ymandel marked an inline comment as done. ymandel added a comment. Use backticks instead of quotes for quoted code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 Files:

[PATCH] D56933: [Tooling][RFC] Introduce Stencil library to simplify source code generation in refactorings.

2019-01-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. Herald added subscribers: cfe-commits, jfb. REQUEST FOR COMMENT: this is not intended (yet) as a proper revision. It complements the design document for Transformer: https://docs.google.com/document/d/1ppw0RhjwsrbBcHYhI85pe6ISDbA6r5d00ot3N8cQWeQ/edit?usp=sharing

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2905 +/// cxxMemberCallExpr(on(callExpr())) +/// matches `(g()).m()` /// aaron.ballman wrote: > Missing a full stop. also fixed

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182301. ymandel marked 2 inline comments as done. ymandel added a comment. Update HTML docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182299. ymandel added a comment. Respond to comments; fix mistake (revealed by test). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:475 + auto MatchesType = cxxMemberCallExpr(on(hasType(cxxRecordDecl(hasName("X"); + EXPECT_TRUE(matches( + R"cc(

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 182295. ymandel added a comment. Extended test for matcher `on`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56850/new/ https://reviews.llvm.org/D56850 Files: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index:

[PATCH] D56850: [ASTMatchers][NFC] Add tests for assorted `CXXMemberCallExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D56850#1361436 , @lebedev.ri wrote: > Please always subscribe lists. > The reviews that happen without lists are null and void. Thanks for updating my diffs with the relevant list. Noted for next time. > Is this testing

[PATCH] D56786: [ASTMatchers] Changes to `CXXMemberExpr` matchers.

2019-01-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D56786#1360706 , @steveire wrote: > It seems that you update docs for existing matchers without changing those > matchers. You could put all of that in one patch. > > Then, you seem to add some tests for existing matches. You

[PATCH] D56786: [ASTMatchers] Changes to `CXXMemberExpr` matchers.

2019-01-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added a comment. In D56786#1359920 , @lebedev.ri wrote: > In D56786#1359903 , @ymandel wrote: > > > In D56786#1359879 ,

[PATCH] D56786: Changes to `CXXMemberExpr` matchers.

2019-01-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D56786#1359879 , @steveire wrote: > Can you break this up into multiple commits? Sure, but any suggestions on granularity? E.g. i can split into two: the fixes/clarifications in one and the new matcher in another; or i

[PATCH] D56786: Changes to `CXXMemberExpr` matchers.

2019-01-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. Herald added a subscriber: cfe-commits. Assorted changes to matchers for `CXXMemberExpr`: - fixes the comments on `hasObjectExpression`, - clarifies comments on `thisPointerType` and `on`, - adds comments to `onImplicitObjectArgument` - adds new matcher

[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/

[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

[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

[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

<    9   10   11   12   13   14   15   >