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:
> Throughout the function we use data members instead of accessors. Is one 
> preferrable to the other?
I don't think there is a difference.


================
Comment at: clang/lib/Tooling/Syntax/Tree.cpp:124
+    return BeforeBegin ? BeforeBegin->NextSibling : FirstChild;
+  };
+
----------------
Why lambda and not:

```
Node *&Begin = BeforeBegin ? BeforeBegin->NextSibling : FirstChild;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89303

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to