summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BasicConstraintManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Enhance "Assumption" logic in BasicConstraintManager when reasoning about ↵Ted Kremenek2008-10-171-1/+20
| | | | | | regions and symbolic regions. When assuming whether or not a location is non-null, walk up the region hierarchy until we hit a symbolic region (and test it for null). This may not be the end all solution, as the notion of what a "symbolic region" is really belongs in the specific subclass of StoreManager. llvm-svn: 57730
* This patch did the following renaming. There should be no functional changes.Zhongxing Xu2008-10-171-32/+32
| | | | | | | | | | RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc llvm-svn: 57671
* Remove lval::FieldOffset, lval::ArrayOffset. These will be replaced with ↵Ted Kremenek2008-10-171-8/+0
| | | | | | | | | | | regions. Remove GRExprEngine::getLVal and RValues::MakeVal. Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this). Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements? llvm-svn: 57657
* This is a big patch, but the functionality change is small and the rest of ↵Ted Kremenek2008-10-041-1/+1
| | | | | | | | | | | | | | the patch consists of deltas due to API changes. This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on. The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables. There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized. The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker. llvm-svn: 57042
* Fixed logic error in BasicConstraintManager pointed out by Zhongxing Xu.Ted Kremenek2008-09-191-20/+7
| | | | | | | | | | | | | | | For checking if a symbol >= value, we need to check if symbol == value || symbol > value. When checking symbol > value and we know that symbol != value, the path is infeasible only if value == maximum integer. For checking if a symbol <= value, we need to check if symbol == value || symbol < value. When checking symbol < value and we know that symbol != value, the path is infeasible only if value == minimum integer. Updated test case exercising this logic: we only prune paths if the values are unsigned. llvm-svn: 56354
* Add an omitted case for AssumeSymInt.Zhongxing Xu2008-09-191-0/+6
| | | | llvm-svn: 56334
* Minor pass-sensitivity improvement:Ted Kremenek2008-09-161-4/+25
| | | | | | | if we know that 'len != 0' and know that 'i == 0' then we know that 'i < len' must evaluate to true and cannot evaluate to false llvm-svn: 56260
* Add newline at end of file.Daniel Dunbar2008-08-301-1/+1
| | | | llvm-svn: 55559
* Added LLVM comment header.Zhongxing Xu2008-08-291-0/+14
| | | | llvm-svn: 55537
* Migrate the rest symbolic analysis stuff to BasicConstraintManager.Zhongxing Xu2008-08-291-12/+164
| | | | llvm-svn: 55536
* Refactor Assume logic into a separate class ConstraintManager.Zhongxing Xu2008-08-271-0/+298
llvm-svn: 55412
OpenPOWER on IntegriCloud