[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the fixes! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64573/new/ https://reviews.llvm.org/D64573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-20 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. @Ka-Ka Thanks for bringing it to our attention! I fixed these warnings in: https://github.com/llvm/llvm-project/commit/9caf12e8495c1106dd3d1079892ce4f39f91b7d2 https://github.com/llvm/llvm-project/commit/73f423e739bcb9bee7b73f05d4bcd50782013a8c Repository: rG LLVM

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-20 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added inline comments. Comment at: clang/lib/Tooling/Syntax/Mutations.cpp:74 + + if (auto *Parent = llvm::dyn_cast(S->parent())) { +// A child of CompoundStatement can just be safely removed. This line introduce a buildbot fail:

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-18 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. Updated version LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64573/new/ https://reviews.llvm.org/D64573 ___ cfe-commits mailing list

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 3 inline comments as done. ilya-biryukov added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:528 +void test() { + HALF_IF HALF_IF_2 else {} +})cpp", ilya-biryukov wrote: > gribozavr2 wrote: > > Could you also do

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ad15046dcf6: [Syntax] Allow to mutate syntax trees (authored by ilya-biryukov). Changed prior to commit: https://reviews.llvm.org/D64573?vs=234494=234496#toc Repository: rG LLVM Github Monorepo

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as not done. ilya-biryukov added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:57 + return nullptr; +} + gribozavr2 wrote: > Seems like these first/last helpers should be methods on

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 234494. ilya-biryukov marked 6 inline comments as done. ilya-biryukov added a comment. - Fix a header guard - Make firstLeaf and lastLeaf methods inside Tree - Mark non-modifiable nodes with I (for immutable) Repository: rG LLVM Github Monorepo

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-17 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 60958 tests passed, 0 failed and 726 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/BuildTree.h:25 +/// Allows to create syntax trees from subtrees not backed by the source code. +class Factory { +public: gribozavr2 wrote: > Why a class to contain static

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 234359. ilya-biryukov marked 24 inline comments as done. ilya-biryukov added a comment. - Addressed most comments - Rebased onto HEAD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64573/new/

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-12-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Generally looks good, just nitpicks. Comment at: clang/include/clang/Tooling/Syntax/BuildTree.h:24 const

[PATCH] D64573: [Syntax] Allow to mutate syntax trees

2019-07-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a subscriber: mgorny. Herald added a project: clang. ilya-biryukov added a parent revision: D63835: [Syntax] Add nodes for most common statements. This patch adds facilities to mutate the syntax trees