martong added inline comments.

================
Comment at: clang/include/clang/Analysis/CFG.h:1311
+
+  llvm::iterator_range<iterator> nodes() { return *this; }
+  llvm::iterator_range<const_iterator> const_nodes() const { return *this; }
----------------
martong wrote:
> Do we convert `this` to `CFGBlock *Entry` here? If yes, please comment it 
> there in the code, so others should not be forced to dig up the first data 
> member. (If no then this code is hard to understand.)
> 
> Even better, why not `return *Entry`?
Uuups, okay, so we use `begin` and `end` here, my bad. But then perhaps it is 
better to explicitly write this down. E.g. return {begin(), end()}, would be 
much cleaner IMHO.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87518

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

Reply via email to