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

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 02:57:19 PDT 2020


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);
----------------
Throughout the function we use data members instead of accessors. Is one preferrable to the other?


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