[PATCH] D111640: [Analyzer][NFC] Add RangedConstraintManager to ConstraintAssignor
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 22 01:46:49 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe2a2c8328f57: [Analyzer][NFC] Add RangedConstraintManager to ConstraintAssignor (authored by martong).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111640/new/
https://reviews.llvm.org/D111640
Files:
clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
Index: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+++ clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
@@ -1600,12 +1600,13 @@
public:
template <class ClassOrSymbol>
LLVM_NODISCARD static ProgramStateRef
- assign(ProgramStateRef State, SValBuilder &Builder, RangeSet::Factory &F,
- ClassOrSymbol CoS, RangeSet NewConstraint) {
+ assign(ProgramStateRef State, RangeConstraintManager &RCM,
+ SValBuilder &Builder, RangeSet::Factory &F, ClassOrSymbol CoS,
+ RangeSet NewConstraint) {
if (!State || NewConstraint.isEmpty())
return nullptr;
- ConstraintAssignor Assignor{State, Builder, F};
+ ConstraintAssignor Assignor{State, RCM, Builder, F};
return Assignor.assign(CoS, NewConstraint);
}
@@ -1614,9 +1615,9 @@
RangeSet Constraint);
private:
- ConstraintAssignor(ProgramStateRef State, SValBuilder &Builder,
- RangeSet::Factory &F)
- : State(State), Builder(Builder), RangeFactory(F) {}
+ ConstraintAssignor(ProgramStateRef State, RangeConstraintManager &RCM,
+ SValBuilder &Builder, RangeSet::Factory &F)
+ : State(State), RCM(RCM), Builder(Builder), RangeFactory(F) {}
using Base = ConstraintAssignorBase<ConstraintAssignor>;
/// Base method for handling new constraints for symbols.
@@ -1696,6 +1697,7 @@
}
ProgramStateRef State;
+ RangeConstraintManager &RCM;
SValBuilder &Builder;
RangeSet::Factory &RangeFactory;
};
@@ -2420,7 +2422,8 @@
ProgramStateRef RangeConstraintManager::setRange(ProgramStateRef State,
SymbolRef Sym,
RangeSet Range) {
- return ConstraintAssignor::assign(State, getSValBuilder(), F, Sym, Range);
+ return ConstraintAssignor::assign(State, *this, getSValBuilder(), F, Sym,
+ Range);
}
//===------------------------------------------------------------------------===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111640.381481.patch
Type: text/x-patch
Size: 2170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211022/b3929474/attachment-0001.bin>
More information about the cfe-commits
mailing list