|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
263dcf45 |
| 07-Jul-2022 |
Haojian Wu <[email protected]> |
[syntax] Introduce a TokenManager interface.
TokenManager defines Token interfaces for the clang syntax-tree. This is the level of abstraction that the syntax-tree should use to operate on Tokens.
[syntax] Introduce a TokenManager interface.
TokenManager defines Token interfaces for the clang syntax-tree. This is the level of abstraction that the syntax-tree should use to operate on Tokens.
It decouples the syntax-tree from a particular token implementation (TokenBuffer previously). This enables us to use a different underlying token implementation for the syntax Leaf node -- in clang pseudoparser, we want to produce a syntax-tree with its own pseudo::Token rather than syntax::Token.
Differential Revision: https://reviews.llvm.org/D128411
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
23657d9c |
| 27-Oct-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree] Add reverse links to syntax Nodes.
Rationale: Children of a syntax tree had forward links only, because there was no need for reverse links.
This need appeared when we started mutating
[SyntaxTree] Add reverse links to syntax Nodes.
Rationale: Children of a syntax tree had forward links only, because there was no need for reverse links.
This need appeared when we started mutating the syntax tree. On a forward list, to remove a target node in O(1) we need a pointer to the node before the target. If we don't have this "before" pointer, we have to find it, and that requires O(n). So in order to remove a syntax node from a tree, we would similarly need to find the node before to then remove. This is both not ergonomic nor does it have a good complexity.
Differential Revision: https://reviews.llvm.org/D90240
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4 |
|
| #
5011d431 |
| 28-Sep-2020 |
Eduardo Caldas <[email protected]> |
Migrate Declarators to use the List API
After this change all nodes that have a delimited-list are using the `List` API.
Implementation details: Let's look at a declaration with multiple declarator
Migrate Declarators to use the List API
After this change all nodes that have a delimited-list are using the `List` API.
Implementation details: Let's look at a declaration with multiple declarators: `int a, b;` To generate a declarator list node we need to have the range of declarators: `a, b`: However, the `ClangAST` actually stores them as separate declarations: `int a ;` `int b;` We solve that by appropriately marking the declarators on each separate declaration in the `ClangAST` and then for the final declarator `int b`, shrinking its range to fit to the already marked declarators.
Differential Revision: https://reviews.llvm.org/D88403
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc3 |
|
| #
66bcb143 |
| 21-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.
There can be Macros that are tagged with `modifiable`. Thus verifying `canModifyAllDescendants` is not sufficient to avoid macro
[SyntaxTree][Synthesis] Fix: `deepCopy` -> `deepCopyExpandingMacros`.
There can be Macros that are tagged with `modifiable`. Thus verifying `canModifyAllDescendants` is not sufficient to avoid macros when deep copying.
We think the `TokenBuffer` could inform us whether a `Token` comes from a macro. We'll look into that when we can surface this information easily, for instance in unit tests for `ComputeReplacements`.
Differential Revision: https://reviews.llvm.org/D88034
show more ...
|
| #
1dc7836a |
| 21-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`
I also assured that there are no other functions unnecessarily using std::vector as argument.
Differential Re
[SyntaxTree][Nit] Take `ArrayRef` instead of `std::vector` as argument for `createTree`
I also assured that there are no other functions unnecessarily using std::vector as argument.
Differential Revision: https://reviews.llvm.org/D88024
show more ...
|
| #
4a5cc389 |
| 16-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Synthesis] Implement `deepCopy`
Differential Revision: https://reviews.llvm.org/D87749
|
| #
55edf703 |
| 18-Sep-2020 |
Vitaly Buka <[email protected]> |
[NFC] clang-format one line
|
| #
03358bec |
| 18-Sep-2020 |
Vitaly Buka <[email protected]> |
[NFC][Lsan] Fix zero-sized array compilation error
|
| #
1e19165b |
| 17-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use
Prior to this change `createTree` could not create arbitrary syntax trees. Now it dispatches to the constructor of the con
[SyntaxTree][Synthesis] Fix allocation in `createTree` for more general use
Prior to this change `createTree` could not create arbitrary syntax trees. Now it dispatches to the constructor of the concrete syntax tree according to the `NodeKind` passed as argument. This allows reuse inside the Synthesis API. # Please enter the commit message for your changes. Lines starting
Differential Revision: https://reviews.llvm.org/D87820
show more ...
|
| #
7c37b82f |
| 11-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Synthesis] Add support for Tree.
In a future patch * Implement helper function to generate Trees for tests * and test Tree methods, namely `findFirstLeaf` and `findLastLeaf`
Differenti
[SyntaxTree][Synthesis] Add support for Tree.
In a future patch * Implement helper function to generate Trees for tests * and test Tree methods, namely `findFirstLeaf` and `findLastLeaf`
Differential Revision: https://reviews.llvm.org/D87533
show more ...
|
| #
515238d5 |
| 11-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree] Reduce visibility of `Arena::lexBuffer`.
Differential Revision: https://reviews.llvm.org/D87523
|
| #
5d152127 |
| 10-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree][Synthesis] Add support for simple Leafs and test based on tree dump
Differential Revision: https://reviews.llvm.org/D87495
|
| #
4c14ee61 |
| 11-Sep-2020 |
Eduardo Caldas <[email protected]> |
[SyntaxTree] Rename functions to start with verb
According to LLVM coding standards: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Differential
[SyntaxTree] Rename functions to start with verb
According to LLVM coding standards: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Differential Revision: https://reviews.llvm.org/D87498
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
| #
07a41018 |
| 14-Jan-2020 |
Ilya Biryukov <[email protected]> |
[Syntax] Mark synthesized nodes as modifiable
This was an oversight in the original patch. Also add corresponding tests.
|
| #
3b929fe7 |
| 14-Jan-2020 |
Ilya Biryukov <[email protected]> |
[Syntax] Assert invariants on tree structure and fix a bug in mutations
Add checks for some structural invariants when building and mutating the syntax trees.
Fix a bug failing the invariants after
[Syntax] Assert invariants on tree structure and fix a bug in mutations
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.
show more ...
|
| #
1ad15046 |
| 18-Dec-2019 |
Ilya Biryukov <[email protected]> |
[Syntax] Allow to mutate syntax trees
Summary: This patch adds facilities to mutate the syntax trees and produce corresponding text replacements.
The public interface of the syntax library now incl
[Syntax] Allow to mutate syntax trees
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
show more ...
|