[PATCH] D87518: [analyzer][Liveness][NFC] Remove an unneeded pass to collect variables that appear in an assignment
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 14 05:59:54 PDT 2020
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
More information about the cfe-commits
mailing list