aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis
AgeCommit message (Collapse)Author
2008-01-13Fixed lines preventing compilation.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45926 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-13Fixed some comments.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Removed ExplodedNode.h, since its contents are now in ExplodedGraph.hTed Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Merged ExplodedNode.h into ExplodedGraph.h, since the ExplodedNode class willTed Kremenek
only be used in the context of the ExplodedGraph class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13Changed implementation of successor and predecessor sets for ExplodedNodeTed Kremenek
to optimize for the common case of having a single predecessor and a single successor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45921 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
2008-01-11Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdgeTed Kremenek
to have a much simpler, cleaner interpretation of what is a "location" in a function (as encoded by a CFG). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45846 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Added "InfeasibleEdge" to represent an infeasible state transition.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImplTed Kremenek
so that nodes can be marked as representing an infeasible program point. This flag lets the path-sensitive solver know that no successors should be generated for such nodes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Renamed Stmt***Edge and ***StmtEdge (where *** = "Stmt" or "Blk") classes toTed Kremenek
BExpr*** and ***BExpr respectively. These edges represent program locations between the entrance/exit of a block and Block-level Expressions. Also added ***SExpr and SExpr*** ProgramEdges to represent the locations in the program between the evaluation of subexpressions and block-level expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Removed some files related to the path-sensitive solver as part of someTed Kremenek
code restructuring. (new files will be introduced shortly) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45785 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08Added nodes_iterator to the GraphTrait for ExplodedNode<>.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08Added GraphTraits<> partial specializations for ExplodedNode<> classes.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Added more boilerplate for processing end-of-paths.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Added ownership of "checker state" within the ExplodedGraph. Moved code thatTed Kremenek
creates the initial root node from the constructor of ReachabilityEngine to ReachabilityEngine::ExecuteWorklist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Renamed SimulVertex, SimulGraph, and SimulEngine to: Ted Kremenek
ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper) ReachabilityEngine The implementation of the core of the path-sensitive dataflow solver has been de-templatized and places in ReachabilityEngine.cpp. The solver is still incomplete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45711 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04fix a build problem where NULL isn't implicitly defined by the headers this ↵Chris Lattner
file includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Fixed misuse of pointer within SimulVertex::addPredecessor()Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45551 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03SimulGraph::getVertex() now also returns a bool indicating if the returnedTed Kremenek
vertex was freshly created. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03De-constified the pointers returned by the Dst() and Src() methods ofTed Kremenek
the various ProgramEdge classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02SimulVertex: Inverted argument order when calling the Profile method of StateTy.Ted Kremenek
SimulGraph: Inverted argument order when calling the Profile method of VertexTy (plus minor cleanups) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Converted state reference within SimulVertex from StateTy* to StateTy.Ted Kremenek
This is more flexible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45502 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Added/fixed some comments.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45490 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Sprinkled 'typename' and fixed a few typos and type declaration errors toTed Kremenek
make these headers compile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45488 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Added fixme.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Allocate vertices using a BumpPtrAllocator.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45486 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22Added (incomplete) implementation of SimulEngine, a worklist-based dataflowTed Kremenek
solver for path-sensitive, intra-procedural analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Converted Loc back to being of type ProgramEdge. Ultimately I believe we wantTed Kremenek
the ability to refer to the vertex set for all the vertices associated with an edge. This will allow some nice queries over the graph, and (hopefully) will reduce the memory footprint of SimulVertex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Added preliminary implementation of SimulGraph, which represents theTed Kremenek
intra-procedural supergraph of a path-sensitive dataflow analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more sveltTed Kremenek
memory representation). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45297 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21SimulVertex now subclasses FoldingSetNode.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Added Profile method to SimulVertex.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Directory restructing of Analysis files.Ted Kremenek
Created include/clang/Analysis/Analyses directory. - Moved LiveVariables.h and UninitializedValues.h into this dir. Moved ExprDeclBitVector.h into Analysis/Support. Updated all clients who use these headers to reflect the new paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45292 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Renamed file AnalysisVertex.h to SimulVertex.hTed Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Renamed class AnalysisVertex to SimulVertexTed Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Added class "StateVariant", a template class which serves to wrap states thatTed Kremenek
are generated by transfer functions used by the path-sensitive dataflow solver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45273 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Added initial implementation of "AnalysisVertex", a class to represent aTed Kremenek
location*state vertex in an intra-procedural, path-sensitive dataflow supergraph. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Fixed bug in CFG::PopulateBlkExprMap where the orderingTed Kremenek
between fetching the size of the expression map (for use as the next integer id for an Expr*) and the creation of the entry in the map could be non-deterministic. This could cause the size of the map to be incremented prior to the index being determine. On Linux the map entry would be created first, causing the map to the "size" to be incremented prior to it being queried. On Mac OS X we had the reverse behavior. Now the size is always queried prior to the new id being inserted into the map. This was the real cause of the bit-overrun triggered in PR 1847: http://llvm.org/bugs/show_bug.cgi?id=1847 Also reverted the change in patch 44813, which was a bogus fix to this problem: http://llvm.org/viewvc/llvm-project?rev=44813&view=rev git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44822 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Fixed off-by-one-error when resizing Bitvectors used forTed Kremenek
dataflow analysis over expressions and decls. This should fix bug 1847: http://llvm.org/bugs/show_bug.cgi?id=1847 Thanks to Török Edwin for providing a test case that identified the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44813 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-04Removed IntrusiveSPtr. There are no clients of this class anymore, so it isTed Kremenek
not needed, and it was never extensively tested. If we need an intrusive reference-counting smart pointer, we can always import intrusive_ptr from boost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44571 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-20Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion ofTed Kremenek
"block-expressions" when visiting arbitrary expressions (via calls to "Visit()"). This results in a refactoring where a dataflow analysis no longer needs to always special case when handling block-expressions versus non-block expressions. Updated LiveVariables and UninitializedValues to conform to the slightly altered interface of these visitor classes. Thanks to Nuno Lopes for providing a test case that illustrated some fundamental problems in the current design of the CFGXXXStmtVisitor classes and how they were used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-19Removed PersistentMap. It is now superseded in every way by the ImmutableMapTed Kremenek
and ImmutableSet classes in the main LLVM libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44237 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-09Remove addition of protocol names to declaration scopes, use a separateFariborz Jahanian
DenseMap to keep track of such declarations and derive ObjcProtocolDecl directyly from NamedScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42801 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08Rename FileVariable -> FileVar for consistency with its class name, Chris Lattner
likewise block and param. Reorder the layout of the Decl kind enum so that the inheritance tree is reflected in the ordering. This allows trivial range comparisons to determine whether something is an instance of some abstract class, making classof faster. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08Several small patches to do pretty printing for objective-c top-level declsFariborz Jahanian
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to take note of the change I made to CFGRecStmtDeclVisitor.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42764 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-05Removed DataflowStmtVisitor. It is no longer used, and is obsoletedTed Kremenek
by newer visitor interfaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-03Fixed bug where intrusive_ptr_add_ref and intrusive_ptr_release wereTed Kremenek
not declared "static inline." Removed member templates for operator= and copy constructor. They simply didn't work as expected. Fixed reference counting bug when a smart pointer is assigned the value of another smart pointer that refers to the same address. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42562 91177308-0d34-0410-b5e6-96231b3b80d8