summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Syntax/Synthesis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Syntax] Mark synthesized nodes as modifiableIlya Biryukov2020-01-141-0/+4
| | | | | This was an oversight in the original patch. Also add corresponding tests.
* [Syntax] Assert invariants on tree structure and fix a bug in mutationsIlya Biryukov2020-01-141-1/+4
| | | | | | | | Add checks for some structural invariants when building and mutating the syntax trees. Fix a bug failing the invariants after mutations: the parent of nodes added into the tree was null.
* [Syntax] Allow to mutate syntax treesIlya Biryukov2019-12-181-0/+38
Summary: This patch adds facilities to mutate the syntax trees and produce corresponding text replacements. The public interface of the syntax library now includes facilities to: 1. perform type-safe modifications of syntax trees, 2. compute textual replacements to apply the modifications, 3. create syntax trees not backed by the source code. For each of the three, we only add a few example transformations in this patch to illustrate the idea, support for more kinds of nodes and transformations will be done in follow-up patches. The high-level mutation operations are implemented on top of operations that allow to arbitrarily change the trees. They are considered to be implementation details and are not available to the users of the library. Reviewers: sammccall, gribozavr2 Reviewed By: gribozavr2 Subscribers: merge_guards_bot, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64573
OpenPOWER on IntegriCloud