Commit Graph

15 Commits

Author SHA1 Message Date
Ted Kremenek d9de9f148e Add new GRWorkList class that uses two queues:
- one queue (FIFO) to queue up nodes at block entrances
- another queue (LIFO) to queue up other nodes
- The idea is to explore basic blocks to completion, but to do a BFS exploration of blocks.

llvm-svn: 61106
2008-12-16 22:13:33 +00:00
Ted Kremenek 1781080c34 Add (preliminary) transfer function support for ObjCForCollectionStmt. Still need to flesh out some logic.
When processing DeclStmt, use the new interface to StateManager::BindDecl.  Conjuring of symbols is now done in VisitDeclStmt.

llvm-svn: 59155
2008-11-12 19:24:17 +00:00
Ted Kremenek a196618ad0 Fixed an elusive caching bug in ExplodedGraph construction when a PostStmtKind was used instead of a PostStoreKind.
llvm-svn: 57719
2008-10-17 20:49:23 +00:00
Ted Kremenek 0ecb53a421 ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.

llvm-svn: 56245
2008-09-16 18:44:52 +00:00
Ted Kremenek af665820e4 Remove default value for 'Pred' argument to GRCoreEngineImpl::GenerateNode().
llvm-svn: 55392
2008-08-26 22:34:23 +00:00
Ted Kremenek 3f91f037a7 Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
llvm-svn: 54714
2008-08-13 03:10:52 +00:00
Ted Kremenek a7b8ffb05b Refactored most of the "Store" piece of ValueState into a Store type. The
current store implementation is now encapsulated by BasicStore.

These changes prompted some long due constification of ValueState. Much of the
diffs in this patch include adding "const" qualifiers.

llvm-svn: 53423
2008-07-10 22:03:41 +00:00
Ted Kremenek 34a691734e Modified the dead stores checker to...
1) Check if a dead store appears as a subexpression.  For such cases, we emit
   a verbose diagnostic so that users aren't confused.  This addresses:
   
   <rdar://problem/5968508> checker gives misleading report for dead store in loop
   
2) Don't emit a dead store warning when assigning a null value to a pointer.
   This is a common form of defensive programming.  We may wish to make
   this an option to the the checker one day.
   
   This addresses the feature request in the following email:
   
   http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html

llvm-svn: 52555
2008-06-20 21:45:25 +00:00
Ted Kremenek 9a935fbdeb Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad). This solves a caching bug observed in a recent bug report.
llvm-svn: 52443
2008-06-18 05:34:07 +00:00
Ted Kremenek fa5a3d0fe7 Major rewrite/refactoring of static analysis engine. We now use
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.

This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.

llvm-svn: 50443
2008-04-29 21:04:26 +00:00
Ted Kremenek c072b820cf Fixed more caching bugs related to the one fixed in r49914. Silence
compiler warning introduced by a recent patch of mine.

llvm-svn: 49917
2008-04-18 20:35:30 +00:00
Ted Kremenek d004c418b6 Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
llvm-svn: 49907
2008-04-18 16:30:14 +00:00
Ted Kremenek 86051690ea Bug fix in GREndPathNodeBuilderImpl: Use the specified state to construct
a node, not the state of the predecessor.

llvm-svn: 49823
2008-04-16 22:30:40 +00:00
Ted Kremenek 811c2b4edb Added "GREndPathNodeBuilder", a new node builder that will be used for
evaluating transfer functions at the end-of-path.

llvm-svn: 49561
2008-04-11 22:03:04 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00