summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor code formatting cleanups.Ted Kremenek2012-01-041-17/+17
| | | | llvm-svn: 147505
* Fix typos in analyzer diagnostics pointed out by Matt Beaumont-Gay and ↵Ted Kremenek2011-12-221-2/+2
| | | | | | Robert Purves. llvm-svn: 147139
* [analyzer] Change RetainCountChecker to use symbol dump method insteadAnna Zaks2011-12-051-2/+3
| | | | | | | | of relying on SymbolID. This way any expression can be printed (not only SymbolData). llvm-svn: 145829
* [analyzer] Refactor checkers to use helper function for getting callee Decl ↵Anna Zaks2011-12-011-5/+2
| | | | | | | | and name. We are getting name of the called function or it's declaration in a few checkers. Refactor them to use the helper function in the CheckerContext. llvm-svn: 145576
* [static analyzer] Tweak RetainCountChecker's diagnostics to correctly ↵Ted Kremenek2011-11-141-4/+20
| | | | | | | | indicate if a message was due to a property access. This can potentially be refactored for other clients, and this is a regression from the refactoring of property acceses. llvm-svn: 144571
* [analyzer] CheckerContext::getPredecessor() cleanupAnna Zaks2011-11-011-2/+1
| | | | | | Remove unnecessary calls to CheckerContext::getPredecessor() + Comments. llvm-svn: 143513
* [analyzer] Add getLocationContext to CheckerContextAnna Zaks2011-10-261-2/+2
| | | | | | | CheckerContext::getPredecessor is only used to get to the LocationContext half of the times. llvm-svn: 143061
* [analyzer] Rename generateNode -> addTransition in CheckerContextAnna Zaks2011-10-261-10/+10
| | | | | | Also document addTransition methods. llvm-svn: 143059
* [analyzer] Remove getEngine() form CheckerContextAnna Zaks2011-10-251-27/+24
| | | | | | | | A step toward making sure that diagnostics report should only be generated though the CheckerContext and not though BugReporter or ExprEngine directly. llvm-svn: 142947
* [analyzer] Simplify CheckerContextAnna Zaks2011-10-251-4/+4
| | | | | | | | | Remove dead members/parameters: ProgramState, respondsToCallback, autoTransition. Remove addTransition method since it's the same as generateNode. Maybe we should rename generateNode to genTransition (since a transition is always automatically generated)? llvm-svn: 142946
* [analyze] Convert EndOfPath callback to use CheckerContextAnna Zaks2011-10-251-20/+9
| | | | | | | | Get rid of the EndOfPathBuilder completely. Use the generic NodeBuilder to generate nodes. Enqueue the end of path frontier explicitly. llvm-svn: 142943
* [analyzer] Remove dead code.Anna Zaks2011-10-181-1/+0
| | | | | | ExprEngineBuilders is not used. llvm-svn: 142450
* [analyzer] Node Builder refactoring: Introduce a simple Node Builder ↵Anna Zaks2011-10-181-7/+11
| | | | | | | | | | | | | | | | | responsible for generating the node frontier. Currently we have a bunch of different node builders which provide some common functionality but are difficult to refactor. Each builder generates nodes of different kinds and calculates the frontier nodes, which should be propagated to the next step (after the builder dies). Introduce a new NodeBuilder which provides very basic node generation facilities but takes care of the second problem. The idea is that all the other builders will eventually use it. Use this builder in CheckerContext instead of StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder is a hack and will be removed later on). llvm-svn: 142443
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-3/+3
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* [analyzer] Remove the dependency on CheckerContext::getStmt() as well as the ↵Anna Zaks2011-10-061-2/+2
| | | | | | method itself. llvm-svn: 141262
* Fix major regression in RetainCountChecker. DefaultSummaries were not being ↵Ted Kremenek2011-10-051-89/+101
| | | | | | used when they were meant to be. Fixes <rdar://problem/10241614>. llvm-svn: 141250
* [analyzer] Remove the last dependency on CheckerContext::getNodeBuilder() as ↵Anna Zaks2011-10-051-14/+10
| | | | | | | | well as the method itself. Checkers should not directly access NodeBuilder, nodes can be created by calling the CheckerContext's generateNode() methods. llvm-svn: 141249
* [analyzer] Removing more references to CheckerContext::getNodeBuilder(): ask ↵Anna Zaks2011-10-041-6/+2
| | | | | | CheckerContext to generate the nodes. llvm-svn: 141136
* [analyzer] Removing references to CheckerContext::getNodeBuilder(): checkers ↵Anna Zaks2011-10-041-2/+2
| | | | | | can obtain block count directly from the Context. llvm-svn: 141112
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-031-3/+4
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Tweak the interface for analyzing the CF conventions for a nameJohn McCall2011-10-011-8/+6
| | | | | | | | | | | | to take a FunctionDecl* instead of an llvm::StringRef. Eventually we might push more logic in there, like using slightly different conventions for C++ methods. Also, fix a bug where 'copy' and 'create' were being caught in non-camel-cased strings. We want copyFoo and CopyFoo and XCopy but not Xcopy or xcopy. llvm-svn: 140911
* [analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more ↵Anna Zaks2011-09-301-1/+1
| | | | | | precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity). llvm-svn: 140840
* [analyzer] Refactor PathDiagnosticLocation: Make ↵Anna Zaks2011-09-201-6/+10
| | | | | | | | PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) llvm-svn: 140182
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-151-2/+2
| | | | | | | | | of SourceLocations (commit 2 of ?): - Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor. - Rename PathDiagnosticLocation::create to differentiate from the added constructor. llvm-svn: 139825
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-151-2/+4
| | | | | | | | | of SourceLocations (commit 2 of ?): - Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext. - Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function). llvm-svn: 139763
* [analyzer] Refactor: Make PathDiagnosticLocation responsible for creating a ↵Anna Zaks2011-09-141-23/+1
| | | | | | valid object given an ExploadedNode (the same logic can be reused by other checkers). llvm-svn: 139672
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-131-3/+3
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Make helpers static, remove unused variables.Benjamin Kramer2011-09-031-1/+1
| | | | llvm-svn: 139078
* [analyzer] Remove TransferFuncs.h, then deal with the fallout.Jordy Rose2011-09-021-0/+1
| | | | | | And with that, TransferFuncs is gone! llvm-svn: 139003
* [analyzer] Move RetainReleaseChecker to the Checkers library and rename it ↵Jordy Rose2011-09-021-0/+3600
to RetainCountChecker...and clean up the file while I'm at it. llvm-svn: 139002
OpenPOWER on IntegriCloud