diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-22 18:23:34 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-22 18:23:34 +0000 |
commit | 74040833e4fc20920330bdff5e4928362821f62e (patch) | |
tree | 6a88a04133fc70ae6843ff4779b6e9e177a480aa /clang/lib/Analysis/BasicConstraintManager.cpp | |
parent | c58900504bd56fe25b953d49be491da249f0b76a (diff) | |
download | bcm5719-llvm-74040833e4fc20920330bdff5e4928362821f62e.tar.gz bcm5719-llvm-74040833e4fc20920330bdff5e4928362821f62e.zip |
Static analyzer: Remove a bunch of outdated SymbolData objects and
their associated APIs. We no longer need separate SymbolData objects
for fields, variables, etc. Instead, we now associated symbols with
the "rvalue" of a MemRegion (i.e., the value stored at that region).
Now we only have two kinds of SymbolData objects: SymbolRegionRValue
and SymbolConjured.
This cleanup also makes the distinction between a SymbolicRegion and a
symbolic value that is a location much clearer. A SymbolicRegion
represents a chunk of symbolic memory, while a symbolic location is
just a "pointer" with different possible values. Without any specific
knowledge, a symbolic location resolves (i.e., via a dereference) to a
SymbolicRegion. In the future, when we do better alias reasoning, a
symbolic location can become an alias for another location, thus
merging the constraints on the referred SymbolicRegion with the other
region.
llvm-svn: 62769
Diffstat (limited to 'clang/lib/Analysis/BasicConstraintManager.cpp')
-rw-r--r-- | clang/lib/Analysis/BasicConstraintManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Analysis/BasicConstraintManager.cpp b/clang/lib/Analysis/BasicConstraintManager.cpp index 450c38f20b9..c875691167a 100644 --- a/clang/lib/Analysis/BasicConstraintManager.cpp +++ b/clang/lib/Analysis/BasicConstraintManager.cpp @@ -204,13 +204,12 @@ BasicConstraintManager::AssumeAux(const GRState* St,NonLoc Cond, case nonloc::SymbolValKind: { nonloc::SymbolVal& SV = cast<nonloc::SymbolVal>(Cond); SymbolRef sym = SV.getSymbol(); - + QualType T = SymMgr.getType(sym); + if (Assumption) - return AssumeSymNE(St, sym, BasicVals.getValue(0, SymMgr.getType(sym)), - isFeasible); + return AssumeSymNE(St, sym, BasicVals.getValue(0, T), isFeasible); else - return AssumeSymEQ(St, sym, BasicVals.getValue(0, SymMgr.getType(sym)), - isFeasible); + return AssumeSymEQ(St, sym, BasicVals.getValue(0, T), isFeasible); } case nonloc::SymIntConstraintValKind: |