summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
Commit message (Collapse)AuthorAgeFilesLines
* Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!Ted Kremenek2008-04-201-2/+5
| | | | llvm-svn: 50012
* Gracefully handle when the receiver of a message expression is not a pointer ↵Ted Kremenek2008-04-191-1/+5
| | | | | | type. llvm-svn: 49959
* Another bug fix in emitting warnings without a path: construct a unit ↵Ted Kremenek2008-04-181-17/+25
| | | | | | | | PathDiagnostic as we did before. This allows the HTMLDiagnostic object to retrieve the bug type, bug description, etc. llvm-svn: 49939
* Reenable using the PathDiagnosticClient for BugReports without paths.Ted Kremenek2008-04-181-2/+5
| | | | llvm-svn: 49934
* Generalize caching mechanism for bugs reports. Now individual BugTypesTed Kremenek2008-04-185-23/+23
| | | | | | | | can decide the policy on how to cache related bugs. This allows us to properly to handle warning about multiple leaks in the same location in the ref count checker (not yet done). llvm-svn: 49918
* Fixed more caching bugs related to the one fixed in r49914. SilenceTed Kremenek2008-04-182-14/+27
| | | | | | compiler warning introduced by a recent patch of mine. llvm-svn: 49917
* Fixed elusive caching bug that led to false positives.Ted Kremenek2008-04-181-1/+2
| | | | llvm-svn: 49914
* Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errorsTed Kremenek2008-04-182-9/+68
| | | | | | | | from registered BugTypes. This helps with debugging. Add detection of NULL values in ref count checker; this suppresses false positives. llvm-svn: 49912
* Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluatingTed Kremenek2008-04-181-7/+20
| | | | | | the checker-specific logic of symbolic assumptions. llvm-svn: 49910
* Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the ↵Ted Kremenek2008-04-182-1/+6
| | | | | | node cache. llvm-svn: 49907
* More grammar fixes.Ted Kremenek2008-04-181-2/+8
| | | | llvm-svn: 49895
* Fix plurality debacle.Ted Kremenek2008-04-181-1/+1
| | | | llvm-svn: 49894
* Added path diagnostics for reference counts.Ted Kremenek2008-04-181-9/+101
| | | | llvm-svn: 49892
* BugReport::VisitNode now takes BugReporter& instead of ASTContext&.Ted Kremenek2008-04-182-101/+157
| | | | | | | | Shuffled around code in CFRefCount to better pair classes with implementation, and started adding subclasses of RangedBugReport to handle better diagnostics for reference count bugs. llvm-svn: 49889
* Added null check.Ted Kremenek2008-04-181-0/+3
| | | | llvm-svn: 49887
* Simplified internal logic of BugReporter, consolidating EmitWarning andTed Kremenek2008-04-184-50/+48
| | | | | | | | EmitPathWarning into one method. We now properly handle emitting warnings without a PathDiagnosticClient when the warning does not involve a particular statement. llvm-svn: 49884
* Modified BugReport::getEndPath() to handle the case where end path is atTed Kremenek2008-04-171-15/+43
| | | | | | the exit block of the CFG. llvm-svn: 49880
* Hook up reporting reference count memory leaks to the BugReporter mechanism.Ted Kremenek2008-04-171-0/+31
| | | | llvm-svn: 49879
* Added transfer function support for ReturnStmt to support detecting leaksTed Kremenek2008-04-171-33/+160
| | | | | | involving objects that are returned but have an excessive reference count. llvm-svn: 49861
* Fix MSVC compiler error: "initialization of 'VD' is skipped by 'case' label"Argyrios Kyrtzidis2008-04-171-1/+2
| | | | llvm-svn: 49853
* Handle ReturnStmts by dispatching to "EvalReturn" in the transfer function ↵Ted Kremenek2008-04-161-9/+28
| | | | | | object. llvm-svn: 49826
* CF ref. count checker: Register memory leaks at the end of a path.Ted Kremenek2008-04-161-31/+84
| | | | llvm-svn: 49824
* Bug fix in GREndPathNodeBuilderImpl: Use the specified state to constructTed Kremenek2008-04-161-1/+1
| | | | | | a node, not the state of the predecessor. llvm-svn: 49823
* Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a ↵Ted Kremenek2008-04-162-49/+6
| | | | | | | | | | | block's terminator. Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator(). Bug fix: CFG now computes Block-level expression numbers using information from block terminators. This fixes <rdar://problem/5868189>. llvm-svn: 49818
* Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV toTed Kremenek2008-04-163-18/+87
| | | | | | represent possible stores to "Unknown." llvm-svn: 49811
* Add missing file.Ted Kremenek2008-04-161-0/+19
| | | | llvm-svn: 49805
* Hook up "EvalStore" from GRTransferFuncs to GRExprEngine.Ted Kremenek2008-04-161-3/+20
| | | | llvm-svn: 49804
* Take first step to migrating handling of "stores" to values from GRExprEngineTed Kremenek2008-04-161-3/+8
| | | | | | to the plug-in GRTransferFuncs object. llvm-svn: 49801
* LiveVariables now updates the liveness state of block-level expressions thatTed Kremenek2008-04-161-12/+49
| | | | | | are referenced by CFGBlock terminators. llvm-svn: 49798
* In ExplodedGraphImpl::Trim, prioritize for paths that don't span loops by usingTed Kremenek2008-04-161-5/+34
| | | | | | | | | two worklists: for nodes whose locations are block edges with loop terminators and another for nodes with all other locations. We only dequeue from the loop worklist when the other is empty. Exploration of the graph is still in reverse-BFS. llvm-svn: 49791
* Implemented toll-free bridging support for CF Reference count checker.Ted Kremenek2008-04-161-39/+113
| | | | llvm-svn: 49771
* Simplify some code.Ted Kremenek2008-04-161-31/+28
| | | | llvm-svn: 49763
* Added initial boilerplate to support toll-free bridging in the ref-count ↵Ted Kremenek2008-04-151-0/+40
| | | | | | checker. llvm-svn: 49756
* Added some comments to GRExprEngine. Reorder some of the method definitionsTed Kremenek2008-04-153-317/+403
| | | | | | | | to start logically organizing them. Added initial plug-in transfer function support for Objective-C message expressions. llvm-svn: 49752
* Change "VisitBlockVarDecl" to "VisitVarDecl". UninitializedValues now worksTed Kremenek2008-04-151-1/+1
| | | | | | as before r49748 (where BlockVarDecl was removed). llvm-svn: 49749
* Remove FileVarDecl and BlockVarDecl. They are replaced by ↵Steve Naroff2008-04-152-15/+22
| | | | | | | | VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl(). This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
* Fix bug in terminator processing for uninitialized-values: simply ignore the ↵Ted Kremenek2008-04-152-17/+73
| | | | | | | | | | terminator, don't reprocess it. LiveVariables analysis now does a flow-insensitive analysis to determine what variables have their address taken; these variables are now always treated as being live. The DataflowSolver now uses "SetTopValue()" when getting the initial value for the entry/exit block. llvm-svn: 49734
* Fix a compiler error on MSVC (variable name 'E' clash).Argyrios Kyrtzidis2008-04-151-1/+1
| | | | llvm-svn: 49727
* Improve dead store diagnostic.Ted Kremenek2008-04-151-1/+1
| | | | llvm-svn: 49711
* Added initial support into the flow-sensitive dataflow solver to visit the ↵Ted Kremenek2008-04-152-1/+21
| | | | | | | | | | | | | Block-level expression in a block's terminator. This expression is visited within a block, but it is accessed by the terminator. This is important to observe because for live-variables analysis the block-level expression is live between the terminator and where the expression occurs in the block. So far this hasn't been an issue to not observe this because the block-level expression used in the terminator is always the last one in the block, and we have never queried the liveness information about this point (but before the terminator). llvm-svn: 49709
* Bug fix in dead stores: don't always check the liveness of the first declTed Kremenek2008-04-151-1/+1
| | | | | | in a DeclStmt. llvm-svn: 49708
* ++/-- makes a variable live since it is used; thus the liveness state isTed Kremenek2008-04-151-3/+3
| | | | | | "Alive" as opposed to staying the same. llvm-svn: 49707
* Bug fix in LiveVariables: Operators ++/-- may kill a value, but the variableTed Kremenek2008-04-151-6/+5
| | | | | | is still live. llvm-svn: 49705
* Don't flag dead stores that occur in macros.Ted Kremenek2008-04-141-0/+4
| | | | llvm-svn: 49672
* Have BugReporter::EmitWarning use the PathDiagnosticClient if it is available.Ted Kremenek2008-04-141-10/+22
| | | | llvm-svn: 49668
* Bug fix in dead-store checker when walking the Decls in a DeclStmt: don'tTed Kremenek2008-04-141-2/+5
| | | | | | assume that DeclStmts only have VarDecls; they can have TypedefDecls. llvm-svn: 49662
* Treat calls to unresolved functions in the CF-ref count checker as callsTed Kremenek2008-04-141-8/+6
| | | | | | to functions with NULL summaries. llvm-svn: 49660
* Hooked up the dead-store checker to the BugReporter interface. Now dead-storeTed Kremenek2008-04-145-111/+179
| | | | | | warnings are emitted as part of the warnings registered by GRSimpleVals. llvm-svn: 49658
* Add some boilerplate to report memory leaks at the end of an analyzed function.Ted Kremenek2008-04-111-1/+29
| | | | | | | Still need some boilerplate in BugReporter to report bugs at the end of a function (not associated with a particular statement). llvm-svn: 49564
* Added "GREndPathNodeBuilder", a new node builder that will be used forTed Kremenek2008-04-111-9/+27
| | | | | | evaluating transfer functions at the end-of-path. llvm-svn: 49561
OpenPOWER on IntegriCloud