[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas marked an inline comment as done. eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/Tree.cpp:122 #endif + Node * = BeforeBegin ? BeforeBegin->NextSibling : FirstChild; + gribozavr2 wrote: > Could you move this definition up so

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-14 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4178f8f2f08e: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel` (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-14 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Syntax/Tree.cpp:122 #endif + Node * = BeforeBegin ? BeforeBegin->NextSibling : FirstChild; + Could you move this

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-14 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 298079. eduucaldas marked 2 inline comments as done. eduucaldas added a comment. Answer to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89303/new/ https://reviews.llvm.org/D89303 Files:

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Tooling/Syntax/Tree.cpp:103 #ifndef NDEBUG - for (auto *N = New; N; N = N->getNextSibling()) { + for (auto *N = New; N; N = N->NextSibling) { assert(N->Parent == nullptr); eduucaldas wrote: >

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added a reviewer: gribozavr2. eduucaldas added inline comments. Comment at: clang/lib/Tooling/Syntax/Tree.cpp:103 #ifndef NDEBUG - for (auto *N = New; N; N = N->getNextSibling()) { + for (auto *N = New; N; N = N->NextSibling) { assert(N->Parent == nullptr);

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297803. eduucaldas added a comment. minor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89303/new/ https://reviews.llvm.org/D89303 Files: clang/lib/Tooling/Syntax/Tree.cpp Index:

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas updated this revision to Diff 297800. eduucaldas added a comment. minor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89303/new/ https://reviews.llvm.org/D89303 Files: clang/lib/Tooling/Syntax/Tree.cpp Index:

[PATCH] D89303: [SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

2020-10-13 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. - Add assertions for other preconditions. - If nothing is modified, don't mark it. Repository: rG LLVM Github Monorepo