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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
I'll revert the change. On Wed, Apr 3, 2019 at 1:00 PM Yitzhak Mandelbaum wrote: > https://reviews.llvm.org/D60213 for the record > > On Wed, Apr 3, 2019 at 12:55 PM Yitzhak Mandelbaum > wrote: > >> Thanks. Do you have build command I can run before/after to verify my >> fix before I submit?

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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Alexey, thanks for reverting the change. Can you expand on why a dependency from libToolingRefactor to libTooling causes a cycle in the dep graph? In particular, I can't find the reverse dependency libTooling -> libToolingRefactor. If you can expand on that (I presume its a chain rather than a

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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Thanks. Do you have build command I can run before/after to verify my fix before I submit? On Wed, Apr 3, 2019 at 12:43 PM Alexey Bataev via Phabricator < revi...@reviews.llvm.org> wrote: > ABataev added a comment. > > Patch breaks the build with the shared libraries, for example, >

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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
https://reviews.llvm.org/D60213 for the record On Wed, Apr 3, 2019 at 12:55 PM Yitzhak Mandelbaum wrote: > Thanks. Do you have build command I can run before/after to verify my fix > before I submit? > > On Wed, Apr 3, 2019 at 12:43 PM Alexey Bataev via Phabricator < >

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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
That would be great, thank you. On Wed, Apr 3, 2019 at 1:28 PM Alexey Bataev via Phabricator < revi...@reviews.llvm.org> wrote: > ABataev added a comment. > > I can revert it for you, if you want > > > Repository: > rG LLVM Github Monorepo > > CHANGES SINCE LAST ACTION >

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

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Thanks. Any idea why AtomicChange.cpp's inclusion of clang/Tooling/ReplacementsYaml.h doesn't cause the same problem? https://github.com/llvm/llvm-project/blob/master/clang/lib/Tooling/Refactoring/AtomicChange.cpp On Wed, Apr 3, 2019 at 2:11 PM Alexey Bataev wrote: > The problem is that

r357576 - [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Apr 3 06:05:19 2019 New Revision: 357576 URL: http://llvm.org/viewvc/llvm-project?rev=357576=rev Log: [LibTooling] Add Transformer, a library for source-to-source transformations. Summary: Adds a basic version of Transformer, a library supporting the concise

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

2019-04-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Apr 5 07:05:03 2019 New Revision: 357764 URL: http://llvm.org/viewvc/llvm-project?rev=357764=rev Log: [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. Summary: Introduces a utility library in Refactoring/ to collect routines

r357768 - [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-04-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Apr 5 08:14:05 2019 New Revision: 357768 URL: http://llvm.org/viewvc/llvm-project?rev=357768=rev Log: [LibTooling] Add Transformer, a library for source-to-source transformations. Summary: Adds a basic version of Transformer, a library supporting the concise

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

2019-02-25 Thread Yitzhak Mandelbaum via cfe-commits
We're working out the details, but the intent is that the Tree-transformation library would support the implementation of Transformer. That is, this library is targeted at a lower-level/more advanced user than Transformer. Currently, Transformer is implemented directly on the clang AST API, but

r356095 - [LibTooling] Add retrieval of extended AST-node source to FixIt library

2019-03-13 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Mar 13 12:48:51 2019 New Revision: 356095 URL: http://llvm.org/viewvc/llvm-project?rev=356095=rev Log: [LibTooling] Add retrieval of extended AST-node source to FixIt library Summary: Introduces variants of `getText` and `getSourceRange` that extract the source text of

[clang-tools-extra] r353523 - [clang-tidy][NFC] Test commit. Add missing comma.

2019-02-08 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 8 06:57:22 2019 New Revision: 353523 URL: http://llvm.org/viewvc/llvm-project?rev=353523=rev Log: [clang-tidy][NFC] Test commit. Add missing comma. Modified: clang-tools-extra/trunk/clang-tidy/readability/ConstReturnTypeCheck.cpp Modified:

[clang-tools-extra] r353525 - [clang-tidy][NFC] Fix typo.

2019-02-08 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 8 07:05:57 2019 New Revision: 353525 URL: http://llvm.org/viewvc/llvm-project?rev=353525=rev Log: [clang-tidy][NFC] Fix typo. Fix placement of comma from previous (test) commit. Modified: clang-tools-extra/trunk/clang-tidy/readability/ConstReturnTypeCheck.cpp

r353532 - [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-02-08 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 8 08:00:44 2019 New Revision: 353532 URL: http://llvm.org/viewvc/llvm-project?rev=353532=rev Log: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers. Specifically: * fixes the comments on `hasObjectExpression`, * clarifies comments on

Re: r354136 - Exteded test of .

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
commits and redo as a single one? On Fri, Feb 15, 2019 at 9:54 AM Roman Lebedev wrote: > On Fri, Feb 15, 2019 at 5:42 PM Yitzhak Mandelbaum via cfe-commits > wrote: > > > > Author: ymandel > > Date: Fri Feb 15 06:43:10 2019 > > New Revision: 354136 > >

r354134 - Added test for matcher On.

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 15 06:43:06 2019 New Revision: 354134 URL: http://llvm.org/viewvc/llvm-project?rev=354134=rev Log: Added test for matcher On. Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Modified:

r354136 - Exteded test of .

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 15 06:43:10 2019 New Revision: 354136 URL: http://llvm.org/viewvc/llvm-project?rev=354136=rev Log: Exteded test of . Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

r354135 - Remove unnecessary expectation.

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 15 06:43:08 2019 New Revision: 354135 URL: http://llvm.org/viewvc/llvm-project?rev=354135=rev Log: Remove unnecessary expectation. Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Modified:

r354133 - Add tests for assorted `CXXMemberCallExpr` matchers.

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Feb 15 06:43:03 2019 New Revision: 354133 URL: http://llvm.org/viewvc/llvm-project?rev=354133=rev Log: Add tests for assorted `CXXMemberCallExpr` matchers. Summary: Add tests for matchers `on`, `onImplicitObjectArgument` and `hasObjectExpression`. Reviewers: alexfh,

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

2019-02-15 Thread Yitzhak Mandelbaum via cfe-commits
Was it the complete diff or one of the intermediate commits? I accidentally committed the diff as a series of commits rather than one (squashed) commit. On Fri, Feb 15, 2019 at 4:51 PM Martin Storsjö via Phabricator < revi...@reviews.llvm.org> wrote: > mstorsjo added a comment. > > This broke

r358691 - [LibTooling] Add Stencil library for format-string style codegen.

2019-04-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Apr 18 10:23:01 2019 New Revision: 358691 URL: http://llvm.org/viewvc/llvm-project?rev=358691=rev Log: [LibTooling] Add Stencil library for format-string style codegen. Summary: This file defines the *Stencil* abstraction: a code-generating object, parameterized by

r361037 - [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-17 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri May 17 07:23:33 2019 New Revision: 361037 URL: http://llvm.org/viewvc/llvm-project?rev=361037=rev Log: [LibTooling] Add support to Transformer for composing rules as an ordered choice. This revision updates `RewriteRule` to support multiple subrules that are

Re: r361033 - Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-17 Thread Yitzhak Mandelbaum via cfe-commits
Looks like this caused a breakage: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/18641/steps/ninja%20check%201/logs/stdio On Fri, May 17, 2019 at 9:52 AM Stephen Kelly via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: steveire > Date: Fri May 17 06:55:28 2019 >

Re: r361033 - Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-17 Thread Yitzhak Mandelbaum via cfe-commits
i'll see if i can repro on my build and fix if so. On Fri, May 17, 2019 at 1:56 PM Stephen Kelly wrote: > Hmm, thanks for letting me know! > > Is that an old compiler? > > I'm not near a computer for the weekend. > > Can someone fix or revert? > > Thanks, > > Stephen. > > On Fri 17 May 2019,

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

2019-05-29 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed May 29 05:40:36 2019 New Revision: 361955 URL: http://llvm.org/viewvc/llvm-project?rev=361955=rev Log: [LibTooling] Add `before` and `after` selectors for selecting point-ranges relative to nodes. Summary: The `before` and `after` selectors allow users to specify a

r362707 - [LibTooling] Add insert/remove convenience functions for creating `ASTEdit`s.

2019-06-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Jun 6 07:20:29 2019 New Revision: 362707 URL: http://llvm.org/viewvc/llvm-project?rev=362707=rev Log: [LibTooling] Add insert/remove convenience functions for creating `ASTEdit`s. Summary: `change()` is an all purpose function; the revision adds simple shortcuts for

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

2019-05-24 Thread Yitzhak Mandelbaum via cfe-commits
version 1 here: https://reviews.llvm.org/D62412 On Fri, May 24, 2019 at 1:36 PM Yitzhak Mandelbaum wrote: > So, it only shows up in Release build, I assume because the assert is left > out: > for (const auto : Rule.Cases) { > assert(Case.Explanation != nullptr && >

[clang-tools-extra] r363296 - [clang-tidy] Make ClangTidyCheck::OptionsView public.

2019-06-13 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Jun 13 12:05:02 2019 New Revision: 363296 URL: http://llvm.org/viewvc/llvm-project?rev=363296=rev Log: [clang-tidy] Make ClangTidyCheck::OptionsView public. Summary: The `OptionsView` class is currently protected. This constraint prevents tidies from passing the

r361392 - [LibTooling] Update Transformer to use RangeSelector instead of NodePart enum.

2019-05-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed May 22 07:48:19 2019 New Revision: 361392 URL: http://llvm.org/viewvc/llvm-project?rev=361392=rev Log: [LibTooling] Update Transformer to use RangeSelector instead of NodePart enum. Transformer provides an enum to indicate the range of source text to be edited. That

r361413 - [LibTooling] Update Stencil to use RangeSelector

2019-05-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed May 22 11:03:00 2019 New Revision: 361413 URL: http://llvm.org/viewvc/llvm-project?rev=361413=rev Log: [LibTooling] Update Stencil to use RangeSelector Add support for creating a `StencilPart` from any `RangeSelector`, which broadens the scope of `Stencil`.

Re: [PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-22 Thread Yitzhak Mandelbaum via cfe-commits
I'm confused by the error given that getStatementsRange is a function name. I don't have Visual Studio -- can you find a fix and send a patch? I wonder if taking the address explicitly is enough? Or, if you know how to trigger this error in clang or gcc, I can fix it myself. On Wed, May 22,

[clang-tools-extra] r361418 - [clang-tidy] Add support for writing a check as a Transformer rewrite rule.

2019-05-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed May 22 11:56:18 2019 New Revision: 361418 URL: http://llvm.org/viewvc/llvm-project?rev=361418=rev Log: [clang-tidy] Add support for writing a check as a Transformer rewrite rule. This revision introduces an adaptor from Transformer's rewrite rules

Re: [PATCH] D62201: [LibTooling] Address post-commit feedback for r361152

2019-05-23 Thread Yitzhak Mandelbaum via cfe-commits
Fixed in https://reviews.llvm.org/D62320 On Thu, May 23, 2019 at 10:44 AM Sam Clegg via Phabricator < revi...@reviews.llvm.org> wrote: > sbc100 added a comment. > > I think this build broke the `-DLLVM_BUILD_LLVM_DYLIB=ON > -DLLVM_LINK_LLVM_DYLIB=ON` build. e.g >

Re: [PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-23 Thread Yitzhak Mandelbaum via cfe-commits
Sounds good. I'll send a fix shortly. Found another bug too (captured a StringRef in a lambda) -- shall i bundle the fixes? On Thu, May 23, 2019 at 9:01 AM Ilya Biryukov wrote: > Maybe go with a runtime parameter (of type llvm::function_ref) instead of > the template parameter? > In any

Re: [PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-23 Thread Yitzhak Mandelbaum via cfe-commits
Given that we'll need to store the function reference, is llvm::function_ref still the way to go? The comments seem to warn away from storing function_refs. On Thu, May 23, 2019 at 11:06 AM Yitzhak Mandelbaum wrote: > Sounds good. I'll send a fix shortly. Found another bug too (captured a >

Re: [PATCH] D61774: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-23 Thread Yitzhak Mandelbaum via cfe-commits
Actually, someone already committed a fix: https://reviews.llvm.org/D62202 I can still make this change if it seems worthwhile, but its not strictly necessary at this point. On Thu, May 23, 2019 at 11:14 AM Yitzhak Mandelbaum wrote: > Given that we'll need to store the function reference, is >

r361514 - [LibTooling] Fix dangling references in RangeSelector.

2019-05-23 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu May 23 10:11:33 2019 New Revision: 361514 URL: http://llvm.org/viewvc/llvm-project?rev=361514=rev Log: [LibTooling] Fix dangling references in RangeSelector. Summary: RangeSelector had a number of cases of capturing a StringRef in a lambda, which lead to dangling

r361643 - [LibTooling] Add Explanation parameter to `makeRule`.

2019-05-24 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri May 24 08:11:45 2019 New Revision: 361643 URL: http://llvm.org/viewvc/llvm-project?rev=361643=rev Log: [LibTooling] Add Explanation parameter to `makeRule`. Summary: Conceptually, a single-case RewriteRule has a matcher, edit(s) and an (optional) explanation. `makeRule`

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

2019-05-24 Thread Yitzhak Mandelbaum via cfe-commits
So, it only shows up in Release build, I assume because the assert is left out: for (const auto : Rule.Cases) { assert(Case.Explanation != nullptr && "clang-tidy checks must have an explanation by default;" " explicitly provide an empty explanation if none is

[clang-tools-extra] r361647 - [clang-tidy] In TransformerClangTidyCheck, require Explanation field.

2019-05-24 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri May 24 09:32:03 2019 New Revision: 361647 URL: http://llvm.org/viewvc/llvm-project?rev=361647=rev Log: [clang-tidy] In TransformerClangTidyCheck, require Explanation field. Summary: In general, the `Explanation` field is optional in `RewriteRule` cases. But, because the

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

2019-05-24 Thread Yitzhak Mandelbaum via cfe-commits
looking now... On Fri, May 24, 2019 at 12:49 PM Ilya Biryukov wrote: > This seems to produce warnings about unused variables: > …/llvm/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:20:20: > warning: unused variable 'Case' [-Wunused-variable] > > for (const auto :

r361152 - [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-20 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon May 20 06:15:14 2019 New Revision: 361152 URL: http://llvm.org/viewvc/llvm-project?rev=361152=rev Log: [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes. Summary: The RangeSelector library defines a combinator language for

r361160 - [LibTooling] Fix build break in test after r361152.

2019-05-20 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon May 20 07:44:40 2019 New Revision: 361160 URL: http://llvm.org/viewvc/llvm-project?rev=361160=rev Log: [LibTooling] Fix build break in test after r361152. r361152 broke gcc builds. Modified: cfe/trunk/unittests/Tooling/RangeSelectorTest.cpp Modified:

Re: r361152 - [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-21 Thread Yitzhak Mandelbaum via cfe-commits
S_TO_BUILD} >>> Support >>> ) >>> >>> I think we link Support twice now. Did adding TestingSupport up there >>> not work? I'd expect that your addition would break shared library builds, >>> or something like that. >>> >>>

r361285 - [LibTooling] Address post-commit feedback for r361152

2019-05-21 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue May 21 11:48:58 2019 New Revision: 361285 URL: http://llvm.org/viewvc/llvm-project?rev=361285=rev Log: [LibTooling] Address post-commit feedback for r361152 Fixes a redundant dependency and moves another to its proper place. Reviewers: thakis Subscribers: mgorny,

Re: r361152 - [LibTooling] Add RangeSelector library for defining source ranges based on bound AST nodes.

2019-05-20 Thread Yitzhak Mandelbaum via cfe-commits
would break shared library builds, or > something like that. > > (Also, I tried to fix a build error that old gcc versions had with this > change in r361208.) > > *From: *Yitzhak Mandelbaum via cfe-commits > *Date: *Mon, May 20, 2019 at 9:12 AM > *To: * > > Author: ymandel >

r359574 - [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Apr 30 09:48:33 2019 New Revision: 359574 URL: http://llvm.org/viewvc/llvm-project?rev=359574=rev Log: [LibTooling] Change Transformer's TextGenerator to a partial function. Summary: Changes the signature of the TextGenerator std::function to return an Expected instead

r359578 - [LibTooling] Fix broken test after r359574.

2019-04-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Apr 30 10:24:36 2019 New Revision: 359578 URL: http://llvm.org/viewvc/llvm-project?rev=359578=rev Log: [LibTooling] Fix broken test after r359574. r359574 changed the way that failures are reported, which broke the test TransformerTest.NodePartNameDeclRefFailure which

r359468 - [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected.

2019-04-29 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Apr 29 09:57:40 2019 New Revision: 359468 URL: http://llvm.org/viewvc/llvm-project?rev=359468=rev Log: [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected. Summary: This fixes a few places in the Stencil implementation where a unique_ptr is created

r358705 - [LibTooling] Fix build breakage from commit 7b7ce6683ee.

2019-04-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Apr 18 12:19:01 2019 New Revision: 358705 URL: http://llvm.org/viewvc/llvm-project?rev=358705=rev Log: [LibTooling] Fix build breakage from commit 7b7ce6683ee. On configurations with -Werror,-Wmissing-field-initializers, the commit does not compile. This commit fixes

r358697 - [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Apr 18 10:52:24 2019 New Revision: 358697 URL: http://llvm.org/viewvc/llvm-project?rev=358697=rev Log: [LibTooling] Extend Transformer to support multiple simultaneous changes. Summary: This revision allows users to specify independent changes to multiple (related)

[clang-tools-extra] r364435 - [clang-tidy] Fix ClangTidyTest to initialize context before checks.

2019-06-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Jun 26 08:04:33 2019 New Revision: 364435 URL: http://llvm.org/viewvc/llvm-project?rev=364435=rev Log: [clang-tidy] Fix ClangTidyTest to initialize context before checks. Summary: Currently, `clang::tidy::test::runCheckOnCode()` constructs the check instances *before*

[clang-tools-extra] r364442 - [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Jun 26 09:04:38 2019 New Revision: 364442 URL: http://llvm.org/viewvc/llvm-project?rev=364442=rev Log: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator. Summary: Tidy check behavior often depends on language and/or clang-tidy options. This

r364917 - [LibTooling] Extend `RewriteRule` with support for adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Jul 2 06:11:04 2019 New Revision: 364917 URL: http://llvm.org/viewvc/llvm-project?rev=364917=rev Log: [LibTooling] Extend `RewriteRule` with support for adding includes. Summary: This revision allows users to specify the insertion of an included directive (at the top

[clang-tools-extra] r364922 - [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-02 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Jul 2 06:25:07 2019 New Revision: 364922 URL: http://llvm.org/viewvc/llvm-project?rev=364922=rev Log: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes. Summary: This revision implements support for the `AddedIncludes` field in RewriteRule cases;

[clang-tools-extra] r368700 - [clang-tidy] Update `TransformerClangTidyCheck` to use new `buildMatchers` functionality.

2019-08-13 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Aug 13 07:48:13 2019 New Revision: 368700 URL: http://llvm.org/viewvc/llvm-project?rev=368700=rev Log: [clang-tidy] Update `TransformerClangTidyCheck` to use new `buildMatchers` functionality. Summary: `buildMatchers` is the new, more general way to extract the matcher

r368862 - [libTooling] Fix code to avoid unused-function warning after r368681.

2019-08-14 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Aug 14 08:20:06 2019 New Revision: 368862 URL: http://llvm.org/viewvc/llvm-project?rev=368862=rev Log: [libTooling] Fix code to avoid unused-function warning after r368681. Modified: cfe/trunk/lib/Tooling/Refactoring/Transformer.cpp Modified:

r368681 - [libTooling] In Transformer, generalize `applyFirst` to admit rules with incompatible matchers.

2019-08-13 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Aug 13 05:31:29 2019 New Revision: 368681 URL: http://llvm.org/viewvc/llvm-project?rev=368681=rev Log: [libTooling] In Transformer, generalize `applyFirst` to admit rules with incompatible matchers. Summary: This patch removes an (artificial) limitation of

[clang-tools-extra] r369915 - [clang-tidy][NFC] Qualify `makeRule` call in test, for consistency with other calls.

2019-08-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Aug 26 08:27:05 2019 New Revision: 369915 URL: http://llvm.org/viewvc/llvm-project?rev=369915=rev Log: [clang-tidy][NFC] Qualify `makeRule` call in test, for consistency with other calls. One call `makeRule` is unqualified (and unintentionally relying on ADL to resolve

[clang-tools-extra] r369914 - [clang-tidy] TransformerClangTidyCheck: change choice of location for diagnostic message.

2019-08-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Aug 26 08:17:29 2019 New Revision: 369914 URL: http://llvm.org/viewvc/llvm-project?rev=369914=rev Log: [clang-tidy] TransformerClangTidyCheck: change choice of location for diagnostic message. Summary: This patch changes the location specified to the

[clang-tools-extra] r371396 - [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-09 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Sep 9 05:59:14 2019 New Revision: 371396 URL: http://llvm.org/viewvc/llvm-project?rev=371396=rev Log: [clang-tidy] Fix bug in bugprone-use-after-move check Summary: The bugprone-use-after-move check exhibits false positives for certain uses of the C++17 if/switch init

r372129 - [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-17 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Sep 17 08:10:39 2019 New Revision: 372129 URL: http://llvm.org/viewvc/llvm-project?rev=372129=rev Log: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes. Summary: AnnotatedLine has a tree structure, and things like the body of a lambda will be a

r368188 - [clang][NFC] Fix typo in matcher comment

2019-08-07 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Aug 7 10:01:31 2019 New Revision: 368188 URL: http://llvm.org/viewvc/llvm-project?rev=368188=rev Log: [clang][NFC] Fix typo in matcher comment Also updates corresponding html doc. Modified: cfe/trunk/docs/LibASTMatchersReference.html

r368319 - [clang] Update `ignoringElidableConstructorCall` matcher to ignore `ExprWithCleanups`.

2019-08-08 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Aug 8 10:41:44 2019 New Revision: 368319 URL: http://llvm.org/viewvc/llvm-project?rev=368319=rev Log: [clang] Update `ignoringElidableConstructorCall` matcher to ignore `ExprWithCleanups`. Summary: The `ExprWithCleanups` node is added to the AST along with the

r368326 - [clang][NFC] Move matcher ignoringElidableConstructorCall's tests to appropriate file.

2019-08-08 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Aug 8 11:55:42 2019 New Revision: 368326 URL: http://llvm.org/viewvc/llvm-project?rev=368326=rev Log: [clang][NFC] Move matcher ignoringElidableConstructorCall's tests to appropriate file. Summary: `ignoringElidableConstructorCall` is a traversal matcher, but its

r366469 - [LibTooling] Add function to translate and validate source range for editing

2019-07-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Jul 18 10:26:57 2019 New Revision: 366469 URL: http://llvm.org/viewvc/llvm-project?rev=366469=rev Log: [LibTooling] Add function to translate and validate source range for editing Summary: Adds the function `getRangeForEdit` to validate that a given source range is

r366473 - [LibTooling] Relax Transformer to allow rewriting macro expansions

2019-07-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Jul 18 10:44:54 2019 New Revision: 366473 URL: http://llvm.org/viewvc/llvm-project?rev=366473=rev Log: [LibTooling] Relax Transformer to allow rewriting macro expansions Summary: Currently, Transformer rejects any changes to source locations inside macro expansions.

[clang-tools-extra] r372317 - [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit constructors.

2019-09-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Sep 19 06:12:05 2019 New Revision: 372317 URL: http://llvm.org/viewvc/llvm-project?rev=372317=rev Log: [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit constructors. Summary: After revision 370919, this check incorrectly flags certain cases

r373093 - [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Sep 27 08:26:04 2019 New Revision: 373093 URL: http://llvm.org/viewvc/llvm-project?rev=373093=rev Log: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes. Summary: Every change triggered by a rewrite rule is anchored at a particular

r372936 - [libTooling] Add `run` combinator to Stencils.

2019-09-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Sep 25 17:53:56 2019 New Revision: 372936 URL: http://llvm.org/viewvc/llvm-project?rev=372936=rev Log: [libTooling] Add `run` combinator to Stencils. Summary: This revision adds `run`, a StencilPart that runs a user-defined function that computes a result over

[clang-tools-extra] 489449c - [libTooling] Further simplify `Stencil` type and introduce `MatchComputation`.

2019-11-11 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-11T12:44:15-05:00 New Revision: 489449c28aaa45086d507fbad96826420adf409d URL: https://github.com/llvm/llvm-project/commit/489449c28aaa45086d507fbad96826420adf409d DIFF:

[clang] ce2b5cb - [libTooling] Simplify type structure of `Stencil`s.

2019-11-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-06T10:28:34-05:00 New Revision: ce2b5cb6decb5cce32adde0d23bdea521da0908b URL: https://github.com/llvm/llvm-project/commit/ce2b5cb6decb5cce32adde0d23bdea521da0908b DIFF:

[clang] 6c683aa - [libTooling] Fix breakage from change #84922

2019-11-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-06T11:31:35-05:00 New Revision: 6c683aa8d7d9dcda30b2a9eb42b43cbce5c645b8 URL: https://github.com/llvm/llvm-project/commit/6c683aa8d7d9dcda30b2a9eb42b43cbce5c645b8 DIFF:

[clang-tools-extra] bde3293 - [clang-tidy] Update TransformerClangTidyCheck to use new Transformer bindings.

2019-11-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-06T10:13:33-05:00 New Revision: bde32933027a096b6cfe14b0e9385ac1005fc28a URL: https://github.com/llvm/llvm-project/commit/bde32933027a096b6cfe14b0e9385ac1005fc28a DIFF:

[clang] 9f97480 - [libTooling] Small changes in Transformer API.

2019-11-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-06T11:16:50-05:00 New Revision: 9f97480cddd77bd2d169131a290cc996fc78df0f URL: https://github.com/llvm/llvm-project/commit/9f97480cddd77bd2d169131a290cc996fc78df0f DIFF:

[clang] 01e8dd2 - [libTooling] Add stencil combinators for nodes that may be pointers or values.

2019-11-22 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-22T12:36:40-05:00 New Revision: 01e8dd2e7a852794a60e50f356f171f893503598 URL: https://github.com/llvm/llvm-project/commit/01e8dd2e7a852794a60e50f356f171f893503598 DIFF:

r374962 - [libTooling] Put all Transformer declarations in a single namespace.

2019-10-15 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Oct 15 18:06:46 2019 New Revision: 374962 URL: http://llvm.org/viewvc/llvm-project?rev=374962=rev Log: [libTooling] Put all Transformer declarations in a single namespace. Summary: This revision introduces a new namespace, `clang::transformer`, to hold the declarations

r375003 - [libTooling] Fix r374962: add more Transformer forwarding decls.

2019-10-16 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Oct 16 07:26:20 2019 New Revision: 375003 URL: http://llvm.org/viewvc/llvm-project?rev=375003=rev Log: [libTooling] Fix r374962: add more Transformer forwarding decls. Summary: The move to a new, single namespace in r374962 left out some type definitions from the old

[clang] dd471db - [libTooling] Extend `buildASTFromCodeWithArgs` to take files argument.

2019-11-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-19T12:18:36-05:00 New Revision: dd471dbe99a7e017357809151df56f2d4c3e7a31 URL: https://github.com/llvm/llvm-project/commit/dd471dbe99a7e017357809151df56f2d4c3e7a31 DIFF:

[clang] 6e759da - [libTooling] Add Stencil constructor.

2019-11-01 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2019-11-01T11:53:14-04:00 New Revision: 6e759daf2ea891fdd624d68690cdafdadcca11c9 URL: https://github.com/llvm/llvm-project/commit/6e759daf2ea891fdd624d68690cdafdadcca11c9 DIFF:

r372410 - [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

2019-09-20 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Sep 20 10:11:03 2019 New Revision: 372410 URL: http://llvm.org/viewvc/llvm-project?rev=372410=rev Log: [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators. Summary: Adds two new combinators and corresponding tests to the RangeSelector library. * `ifBound`

r372595 - [libTooling] Introduce new library of source-code builders.

2019-09-23 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Sep 23 05:40:10 2019 New Revision: 372595 URL: http://llvm.org/viewvc/llvm-project?rev=372595=rev Log: [libTooling] Introduce new library of source-code builders. Summary: Introduces facilities for easily building source-code strings, including idiomatic use of

r372605 - [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Sep 23 06:21:42 2019 New Revision: 372605 URL: http://llvm.org/viewvc/llvm-project?rev=372605=rev Log: [libTooling] Add `access` and `ifBound` combinators to Stencil library. Summary: This revision add the `access` and `ifBound` combinators to the Stencil library: *

r372884 - [NFC] Fix typo in `getPreviousDecl` comment.

2019-09-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Sep 25 07:58:39 2019 New Revision: 372884 URL: http://llvm.org/viewvc/llvm-project?rev=372884=rev Log: [NFC] Fix typo in `getPreviousDecl` comment. Modified: cfe/trunk/include/clang/AST/DeclBase.h Modified: cfe/trunk/include/clang/AST/DeclBase.h URL:

r372870 - [libTooling] Introduce the MatchConsumer abstraction

2019-09-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Sep 25 06:34:04 2019 New Revision: 372870 URL: http://llvm.org/viewvc/llvm-project?rev=372870=rev Log: [libTooling] Introduce the MatchConsumer abstraction Summary: This revision introduces a separate (small) library for the `MatchConsumer` abstraction: computations

r372918 - [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED

2019-09-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Sep 25 13:04:25 2019 New Revision: 372918 URL: http://llvm.org/viewvc/llvm-project?rev=372918=rev Log: [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED Summary: Currently, some tests use homegrown matchers to handle `llvm::Expected` values. This

r373916 - [libTooling] Add `toString` method to the Stencil class

2019-10-07 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Oct 7 09:20:22 2019 New Revision: 373916 URL: http://llvm.org/viewvc/llvm-project?rev=373916=rev Log: [libTooling] Add `toString` method to the Stencil class Summary: `toString` generates a string representation of the stencil. Patch by Harshal T. Lehri. Reviewers:

r373928 - [libTooling][NFC] Fix build break in r373916.

2019-10-07 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Oct 7 10:24:23 2019 New Revision: 373928 URL: http://llvm.org/viewvc/llvm-project?rev=373928=rev Log: [libTooling][NFC] Fix build break in r373916. r373916 used raw strings inside macro calls, which breaks some builds. Modified:

[clang-tools-extra] r374271 - [libTooling] Move Transformer files to their own directory/library.

2019-10-09 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Oct 9 19:34:47 2019 New Revision: 374271 URL: http://llvm.org/viewvc/llvm-project?rev=374271=rev Log: [libTooling] Move Transformer files to their own directory/library. Summary: The Transformer library has been growing inside of lib/Tooling/Refactoring. However, it's

r373593 - [libTooling] Add various Stencil combinators for expressions.

2019-10-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Oct 3 06:01:00 2019 New Revision: 373593 URL: http://llvm.org/viewvc/llvm-project?rev=373593=rev Log: [libTooling] Add various Stencil combinators for expressions. Summary: This revision adds three new Stencil combinators: * `expression`, which idiomatically constructs

r374558 - [libTooling] Move `RewriteRule` abstraction into its own header and impl.

2019-10-11 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Oct 11 07:43:46 2019 New Revision: 374558 URL: http://llvm.org/viewvc/llvm-project?rev=374558=rev Log: [libTooling] Move `RewriteRule` abstraction into its own header and impl. Summary: Move the `RewriteRule` class and related declarations into its own set of files

r374552 - [libTooling] Change Stencil equality to use `toString()`

2019-10-11 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Oct 11 07:02:03 2019 New Revision: 374552 URL: http://llvm.org/viewvc/llvm-project?rev=374552=rev Log: [libTooling] Change Stencil equality to use `toString()` Summary: Removes the `isEqual` method from StencilPartInterface and modifies equality to use the string

[clang] 9c54f61 - [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-25T16:37:20-05:00 New Revision: 9c54f6154f748e707ad2385ddf6d66e812890c6a URL: https://github.com/llvm/llvm-project/commit/9c54f6154f748e707ad2385ddf6d66e812890c6a DIFF:

[clang] 38b4516 - [libTooling] Add function to determine associated text of a declaration.

2020-02-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-26T09:56:48-05:00 New Revision: 38b4516de8a4a791d17085d37f95e3cc15c359f9 URL: https://github.com/llvm/llvm-project/commit/38b4516de8a4a791d17085d37f95e3cc15c359f9 DIFF:

[clang] c359f95 - [AST Matchers] Restrict `optionally` matcher to a single argument.

2020-03-05 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-03-05T14:48:40-05:00 New Revision: c359f9537ffb17c4f40a933980ddb515d7ee923b URL: https://github.com/llvm/llvm-project/commit/c359f9537ffb17c4f40a933980ddb515d7ee923b DIFF:

[clang] 586f13a - [AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail.

2020-02-28 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-28T13:46:27-05:00 New Revision: 586f13aeac3fd51916774f523e30f0aee2b62d46 URL: https://github.com/llvm/llvm-project/commit/586f13aeac3fd51916774f523e30f0aee2b62d46 DIFF:

[clang] e5ff92e - [clang][NFC] Expand some `auto`s and add another test for matcher `isExpandedFromMacro`.

2020-02-04 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-04T13:05:58-05:00 New Revision: e5ff92e049b5b60d208d8b87f5ee693a7464d076 URL: https://github.com/llvm/llvm-project/commit/e5ff92e049b5b60d208d8b87f5ee693a7464d076 DIFF:

[clang] 386fd2c - [clang] Add matcher to identify macro expansions.

2020-02-04 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-04T11:43:06-05:00 New Revision: 386fd2c170a78798a097650b8714183d5a9d93c6 URL: https://github.com/llvm/llvm-project/commit/386fd2c170a78798a097650b8714183d5a9d93c6 DIFF:

[clang] 23444ed - [AST matchers] Add basic matchers for googletest EXPECT/ASSERT calls.

2020-02-21 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-21T12:05:15-05:00 New Revision: 23444edf30ba00ccefa3a582ac7ddc29774e9da5 URL: https://github.com/llvm/llvm-project/commit/23444edf30ba00ccefa3a582ac7ddc29774e9da5 DIFF:

[clang] 523cae3 - [libTooling] Add option for `buildAST` to report diagnostics.

2020-02-18 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2020-02-18T09:11:51-05:00 New Revision: 523cae324d79d2e532d2be797058a94e8214ec45 URL: https://github.com/llvm/llvm-project/commit/523cae324d79d2e532d2be797058a94e8214ec45 DIFF:

  1   2   3   4   5   6   >