[cfe-commits] r162246 - in /cfe/trunk: lib/StaticAnalyzer/Core/BasicConstraintManager.cpp lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/reference.cpp
Jordan Rose
jordan_rose at apple.com
Tue Aug 21 13:55:52 PDT 2012
On Aug 21, 2012, at 11:05 , Ted Kremenek <kremenek at apple.com> wrote:
> On Aug 21, 2012, at 9:29 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
>> And both constraint managers are lazy, but in different ways:
>>
>> - RangeConstraintManager treats no range as "all possible values", but generates an actual RangeSet when it needs to do an intersection. This change takes 0 out of the generated set for references.
>> - BasicConstraintManager collects a set of inequalities unless you actually assume an equality constraint. This change added an implicit "!= 0" for references but doesn't actually change the state.
>>
>
> The major negative is now this is essentially hidden requirement of implementing a ConstraintManager.
I pushed the logic up to SimpleConstraintManager in r162313. That's not a perfect solution, because SimpleConstraintManager isn't appropriate for all constraint managers, but it is better than having it duplicated in Basic and Range.
Jordan
More information about the cfe-commits
mailing list