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

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 14 02:17:19 PDT 2020


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 *&Begin = BeforeBegin ? BeforeBegin->NextSibling : FirstChild;
+
----------------
Could you move this definition up so that it can be used in the last assert above?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89303/new/

https://reviews.llvm.org/D89303



More information about the cfe-commits mailing list