[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 8 05:20:04 PDT 2021


vsavchenko added inline comments.


================
Comment at: clang/unittests/StaticAnalyzer/RangeSetTest.cpp:471
+
+  // RHS adjacent to LHS in between.
+  // RHS =>         ___
----------------
I guess I also want to have more cases where ranges from RHS are in between ranges from LHS, also it should be a case with LHS being a set of ranges.


================
Comment at: clang/unittests/StaticAnalyzer/RangeSetTest.cpp:497
+  this->checkUnite({{MIN, B}, {C, MAX}}, {{A, D}}, {{MIN, MAX}});
+}
----------------
Also I'd like to see cases when there are ranges to merge from two sets but then one set has a bunch of other ranges that should be added as is.  We can automatically think of two possibilities here: when these additional ranges are before and after the common part.
And I guess I want at least one check with two sets with a good amount of ranges in both covering all possible situations and overlappings.


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

https://reviews.llvm.org/D99797



More information about the cfe-commits mailing list