[PATCH] D86465: [analyzer][solver] Redesign constraint ranges data structure
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 22 01:11:35 PDT 2021
steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
Given that it did not change any reports in our testbench it seems to be safe to land it.
It clearly improves the API significantly, so I'm not opposing.
Really good work @vsavchenko.
PS: If should support `_ExtInt`s as well, even if they are not too common.
Please try to fill this gap, before you push your changes.
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:495-507
+void RangeSet::dump(raw_ostream &OS) const {
bool isFirst = true;
- os << "{ ";
- for (iterator i = begin(), e = end(); i != e; ++i) {
+ OS << "{ ";
+ for (const Range &R : *this) {
if (isFirst)
isFirst = false;
else
----------------
vsavchenko wrote:
> steakhal wrote:
> > Hmm, we could simplify this further, assuming `Range::operator<<` is defined.
> I think it looks a bit clearer with `llvm::interleaveComma`
Awesome!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86465/new/
https://reviews.llvm.org/D86465
More information about the cfe-commits
mailing list