[SyntaxTree] Improve safety of `replaceChildRangeLowLevel`
authorEduardo Caldas <ecaldas@google.com>
Tue, 13 Oct 2020 09:46:14 +0000 (09:46 +0000)
committerEduardo Caldas <ecaldas@google.com>
Wed, 14 Oct 2020 09:18:32 +0000 (09:18 +0000)
commit4178f8f2f08e14abb341fb32dd0f4cc9320df072
tree3467a1b843d4e58894e7912dca73b3ebc8b97a8a
parent20c7ab87a78c8d808a7d1e662d5bfd580dcdc12e
[SyntaxTree] Improve safety of `replaceChildRangeLowLevel`

* Add assertions for other preconditions.
* If nothing is modified, don't mark it.

Differential Revision: https://reviews.llvm.org/D89303
clang/lib/Tooling/Syntax/Tree.cpp