kadircet added inline comments.
================ Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:110 // begins in selection range, ends in selection range and any scope that begins // outside the selection range, ends outside as well. const Node *getParentOfRootStmts(const Node *CommonAnc) { ---------------- can you also update the comment to mention `returns null if any child of the parent is not a root statement` ================ Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp:111 // outside the selection range, ends outside as well. const Node *getParentOfRootStmts(const Node *CommonAnc) { if (!CommonAnc) ---------------- can we restructure this into: ``` if (!CommonAnc) return nullptr; const Node *Parent = nullptr; switch(...) { ...Fill In Parent... default: llvm_unreachable(..) } return llvm::all_of(..) ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68182/new/ https://reviews.llvm.org/D68182 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits