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 at: clang/lib/Tooling/Syntax/Synthesis.cpp:228 + const auto *T = cast<syntax::Tree>(N); + auto Children = std::vector<std::pair<syntax::Node *, syntax::NodeRole>>(); + for (const auto *Child = T->getFirstChild(); Child; ---------------- ================ Comment at: clang/lib/Tooling/Syntax/Synthesis.cpp:239 + if (!canModifyAllDescendants(N)) + return nullptr; + ---------------- Could you add tests for deepCopy returning nullptr? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87749/new/ https://reviews.llvm.org/D87749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits