aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/ProgramPoint.h
AgeCommit message (Collapse)Author
2009-07-22Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.Ted Kremenek
Educate GRExprEngine::VisitGraph() about 'PreStmt'. Mark the constructor of 'PostStmt' to be explicit, preventing implicit conversions and the selection of the wrong 'generateNode' method in GRStmtNodeBuilder. Constify a bunch of arguments, which falls out of the changes to ProgramPoint. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76809 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22Add 'PreStmt' program point. This will be used to represent checking forTed Kremenek
preconditions (in GRExprEngine) before the statement itself is evaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22Restructure ProgramPoint to have the 'Kind' value be its own instanceTed Kremenek
variable. This gives us much more flexibility with defining more ProgramPoints, which is the direction we are heading. The removal of various bit-mangling of pointers also cleans up the logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Move the source-level CFG from libAST to libAnalysis.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-13Add PostStmt::getStmtAs(). This unbreaks the build.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-08Make BlockEntrace program points taggable.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07analyzer: Add ProgramPoint 'PostLValue' just to distinguish (forTed Kremenek
analysis introspection) when we computed an lvalue. This shouldn't effect the current analysis results in any way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"Ted Kremenek
ProgramPoints all the way through to GRCoreEngine. NSString.m now fails with RegionStoreManager because of the void** cast. Disabling use of region store for that test for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10Add arbitrary "tags" to ProgramPoints. While this fattens up ProgramPoint evenTed Kremenek
more, it gives us a tremendous amount of flexibility for extending the analyzer to handle arbitrary program points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag ↵Ted Kremenek
and data) so that clients don't need a unique address for the pair itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09Refine PostStmtCustom to reference a tagged data pair with the tag to ↵Ted Kremenek
indicate the checker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09Added a new ProgramPoint 'PostStmtCustom' to enable checker-specific ↵Ted Kremenek
ProgramPoints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16ProgramPoint:Ted Kremenek
- Added four new ProgramPoint types that subclass PostStmt for use in GRExprEngine::EvalLocation: - PostOutOfBoundsCheckFailed - PostUndefLocationCheckFailed - PostNullCheckFailed - PostLocationChecksSucceed These were created because of a horribly subtle caching bug in EvalLocation where a node representing an "bug condition" in EvalLocation (e.g. a null dereference) could be re-used as the "non-bug condition" because the Store did not contain any information to differentiate between the two. The extra program points just disables any accidental caching between EvalLocation and its callers. GRExprEngine: - EvalLocation now returns a NodeTy* instead of GRState*. This should be used as the "vetted" predecessor for EvalLoad/EvalStore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-20Add PostStore, a new ProgramPoint to distinguish between 'stores' and other ↵Ted Kremenek
PostStmts. GRExprEngine: Use PostStore in EvalStore. Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56383 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-16ProgramPoint now takes the space of two pointers instead of one. This change wasTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point ↵Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-29Major rewrite/refactoring of static analysis engine. We now useTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50443 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-26Make assertions for all addresses passed to ProgramPoint that they have at ↵Argyrios Kyrtzidis
least an 8-byte alignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Reverted patch 47926 for ProgramPoint.h because it is currently buggy. May ↵Ted Kremenek
add back (fixed) later. Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Added support for ProgramPoints to represent ExplodedNodes in anotherTed Kremenek
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one simulation is layered on another. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03Fixed subtle caching bug in ExplodedGraph that would cause some nodes toTed Kremenek
be incorrectly merged together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Added support to GREngine/GRConstants for handling computed gotos.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Fixed broken bitmasking in the ctor of ProgramPoint.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-16Fixed incorrect pointer mask.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46078 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Now include "CFG.h" because the inline methods of "BlockEntrance" accessorTed Kremenek
the methods of CFGBlock. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45925 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-11Renamed ProgramEdge.h to ProgramPoint.hTed Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45847 91177308-0d34-0410-b5e6-96231b3b80d8