[PATCH] D125776: [llvm-dva] 01 - Interval tree
Carlos Alberto Enciso via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 05:33:22 PDT 2022
CarlosAlbertoEnciso added inline comments.
================
Comment at: llvm/include/llvm/ADT/IntervalTree.h:592
+ IntervalReferences getContaining(PointType Point) const {
+ IntervalReferences IntervalSet;
+ for (find_iterator Iter = find(Point), E = find_end(); Iter != E; ++Iter)
----------------
psamolysov wrote:
> CarlosAlbertoEnciso wrote:
> > CarlosAlbertoEnciso wrote:
> > > psamolysov wrote:
> > > > Should all the query methods contain an assert that the tree has been actually created?
> > > I think it is a good idea. I will add some asserts.
> > Added assertion:
> >
> > ```
> > IntervalReferences getContaining(PointType Point) const {
> > assert(!empty() && "Interval tree it is not constructed.");
> > ...
> > }
> > ```
> Looks good, thank you. Maybe the `it` word is unnecessary.
Thanks. Fixed the typo.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125776/new/
https://reviews.llvm.org/D125776
More information about the llvm-commits
mailing list