[PATCH] D55760: [ADT] IntervalMap: add contains(a, b) method
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 18 07:09:19 PST 2018
labath marked an inline comment as done.
labath added inline comments.
================
Comment at: unittests/ADT/IntervalMapTest.cpp:622
+ EXPECT_FALSE(map.overlaps(0, 9));
+ EXPECT_TRUE(map.overlaps(0, 10));
+ EXPECT_TRUE(map.overlaps(0, 15));
----------------
dexonsmith wrote:
> I’m surprised this one returns true. Are these half-open intervals? If so I think you shouldn’t get overlap until you stop at 11.
These are closed on both sides. Half-open intervals are tested below (where this indeed returns false). The half-openedness of an IntervalMap is controlled via template arguments (see line 17 and 18 in this file).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55760/new/
https://reviews.llvm.org/D55760
More information about the llvm-commits
mailing list