gribozavr2 added inline comments.
Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:205
+ if (L->canModify())
+syntax::FactoryImpl::setCanModify(Leaf);
+
eduucaldas wrote:
> gribozavr2 wrote:
> > Since we are creating new leaves, why prohibit their
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4a5cc389c51d: [SyntaxTree][Synthesis] Implement `deepCopy`
(authored by eduucaldas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST
eduucaldas updated this revision to Diff 293101.
eduucaldas added a comment.
.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87749/new/
https://reviews.llvm.org/D87749
Files:
clang/include/clang/Tooling/Syntax/BuildTree.h
eduucaldas updated this revision to Diff 293089.
eduucaldas marked 3 inline comments as done.
eduucaldas added a comment.
Fix canModifyAllDescendants, add tests for it
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87749/new/
eduucaldas added inline comments.
Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:237
+
+syntax::Node *clang::syntax::deepCopy(syntax::Arena , const Node *N) {
+ if (!canModifyAllDescendants(N))
We are ignoring nullability of pointers.
The casting machinery
gribozavr2 added inline comments.
Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:216
+ Child = Child->getNextSibling())
+if (!Child->canModify())
+ return false;
Shouldn't we call canModifyAllDescendants recursively?
Comment
eduucaldas updated this revision to Diff 293085.
eduucaldas marked 3 inline comments as done.
eduucaldas added a comment.
- `deepCopy` returns `nullptr` if copy code with Macro expansions.
- `deepCopy` also deep copies the Tokens.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/include/clang/Tooling/Syntax/BuildTree.h:45
+/// Deep copies `N`.
+///
"Creates a completely independent copy of `N` (a deep
eduucaldas updated this revision to Diff 292539.
eduucaldas added a comment.
Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87749/new/
https://reviews.llvm.org/D87749
Files:
clang/include/clang/Tooling/Syntax/BuildTree.h
eduucaldas updated this revision to Diff 292145.
eduucaldas added a comment.
Remove extraneous qualifiers in `createTree`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87749/new/
https://reviews.llvm.org/D87749
Files:
eduucaldas created this revision.
eduucaldas added a reviewer: gribozavr2.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
eduucaldas requested review of this revision.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87749
Files:
11 matches
Mail list logo