summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor refactorings/cleanups in CF retain checker and added support for ↵Ted Kremenek2008-05-051-93/+68
| | | | | | | | NSMakeCollectable. Added test case for NSMakeCollectable. llvm-svn: 50653
* Improved diagnostics for leaks: now we report which variable was leaked.Ted Kremenek2008-05-021-5/+33
| | | | llvm-svn: 50588
* When running the reference count checker twice (GC and non-GC mode), only emitTed Kremenek2008-05-021-4/+8
| | | | | | basic warnings (dead stores, null dereferences) on the first pass. llvm-svn: 50584
* Fix copy-paste bug.Ted Kremenek2008-05-011-1/+1
| | | | llvm-svn: 50557
* Remove no longer valid assertion.Ted Kremenek2008-05-011-4/+0
| | | | llvm-svn: 50556
* Added line number diagnostics to indicate the allocation site of the leaked ↵Ted Kremenek2008-05-011-3/+53
| | | | | | object. llvm-svn: 50553
* Do not highlight bogus ranges for leaks.Ted Kremenek2008-05-011-2/+23
| | | | llvm-svn: 50549
* Correctly invalidate reference count state when passing objects by reference ↵Ted Kremenek2008-05-011-3/+38
| | | | | | in message expressions we don't understand. llvm-svn: 50541
* Renamed static method.Ted Kremenek2008-05-011-4/+4
| | | | llvm-svn: 50533
* When processing "release", "retain", and "autorelease" messages return theTed Kremenek2008-05-011-5/+5
| | | | | | | lval passed as an argument. Fix: Inverted diagnostic messages. llvm-svn: 50513
* Added support for "autorelease" message in CF ref. count checker.Ted Kremenek2008-05-011-15/+42
| | | | llvm-svn: 50512
* added preliminary diagnostics in scan-build results to denote whetherTed Kremenek2008-04-301-6/+52
| | | | | | a CF memory leak occurred with GC enabled, etc. llvm-svn: 50507
* Teach more of the static analyzer about ObjCQualifiedIdType.Ted Kremenek2008-04-301-1/+2
| | | | llvm-svn: 50494
* Teach the static analysis engine about ObjCQualifiedIdType.Ted Kremenek2008-04-301-2/+1
| | | | llvm-svn: 50493
* Update typestate logic to support GC-mode.Ted Kremenek2008-04-291-3/+8
| | | | llvm-svn: 50396
* Implement semantics of CFMakeCollectable for the CF-reference count checker.Ted Kremenek2008-04-291-29/+65
| | | | llvm-svn: 50395
* Provide the option to run the CF-retain checker in GC enabled mode.Ted Kremenek2008-04-291-4/+6
| | | | | | The transfer functions for the checker don't do anything special yet in GC mode. llvm-svn: 50394
* Do a better job at computing dead symbols.Ted Kremenek2008-04-251-15/+5
| | | | | | | | | Implemented support for better localized leaks in the CF reference count checker. Now leaks should be flagged close to where they occur. This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved. llvm-svn: 50241
* Add preliminary support for flagging leaks around when they happen (doesn't ↵Ted Kremenek2008-04-241-2/+70
| | | | | | work yet). llvm-svn: 50237
* CF reference count checker: handle variadic functions that allocate CF objects.Ted Kremenek2008-04-241-56/+54
| | | | | | | | | This fixes <rdar://problem/5886141>. Part of this change resulted in creating sparser summaries. I also added some more comments and did some minor code cleanups. llvm-svn: 50214
* Fixed: <rdar://problem/5881148>Ted Kremenek2008-04-231-2/+2
| | | | | | | | | | Problem: In the recently refactored VisitDeref (which processes dereferences), we were incorrectly skipping the node just generated for the subexpression of the dereference. This was a horrible regression. llvm-svn: 50176
* Added lval type (and tracking) for StringLiterals.Ted Kremenek2008-04-221-0/+2
| | | | llvm-svn: 50109
* Generalize caching mechanism for bugs reports. Now individual BugTypesTed Kremenek2008-04-181-2/+2
| | | | | | | | 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
* Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errorsTed Kremenek2008-04-181-5/+53
| | | | | | | | from registered BugTypes. This helps with debugging. Add detection of NULL values in ref count checker; this suppresses false positives. llvm-svn: 49912
* Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the ↵Ted Kremenek2008-04-181-0/+4
| | | | | | 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-181-99/+155
| | | | | | | | 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
* Simplified internal logic of BugReporter, consolidating EmitWarning andTed Kremenek2008-04-181-3/+3
| | | | | | | | 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
* 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
* CF ref. count checker: Register memory leaks at the end of a path.Ted Kremenek2008-04-161-31/+84
| | | | llvm-svn: 49824
* Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV toTed Kremenek2008-04-161-6/+61
| | | | | | represent possible stores to "Unknown." llvm-svn: 49811
* Implemented toll-free bridging support for CF Reference count checker.Ted Kremenek2008-04-161-39/+113
| | | | llvm-svn: 49771
* Added initial boilerplate to support toll-free bridging in the ref-count ↵Ted Kremenek2008-04-151-0/+40
| | | | | | checker. llvm-svn: 49756
* 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-141-4/+4
| | | | | | 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 FIXMETed Kremenek2008-04-111-2/+8
| | | | llvm-svn: 49558
* Fix regression introduced by my last commit.Ted Kremenek2008-04-111-51/+29
| | | | llvm-svn: 49556
* Changed behavior of how we handle "NULL" summaries: just callTed Kremenek2008-04-111-9/+16
| | | | | | | | | | | | | GRSimpleVals::EvalCal(), and don't change reference counts. Remove "getDoNothingSummary()", as a NULL summary does the same thing. Added temporary hack for the "Get" rule for objects that return a pointer type: treat them as non-owned CF objects. Added test case to detect the release of a non-owned object. llvm-svn: 49555
* Use RangedBugReport to report better ranges for reference count errors.Ted Kremenek2008-04-111-11/+20
| | | | llvm-svn: 49552
* Fixed some logic errors in the CF ref count checker; we now can detect simpleTed Kremenek2008-04-101-22/+42
| | | | | | use-after-release errors. Added test case. llvm-svn: 49509
* Simplify CF ref. count checker state machine.Ted Kremenek2008-04-101-31/+36
| | | | llvm-svn: 49505
* Fix some bonehead bugs in summary generation in CFRefCount.Ted Kremenek2008-04-101-26/+31
| | | | llvm-svn: 49503
* Refactored all logic to run the GRSimpleVals and CFRef checker into a commonTed Kremenek2008-04-101-17/+2
| | | | | | | | code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. llvm-svn: 49500
* CFRefCount analysis now properly calls "EmitWarnings" after analyzing a ↵Ted Kremenek2008-04-101-4/+1
| | | | | | function. llvm-svn: 49488
* Hooked up initial reference-count checks to the BugReporter interface.Ted Kremenek2008-04-091-31/+86
| | | | llvm-svn: 49455
* Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.Ted Kremenek2008-04-091-7/+5
| | | | | | | | | | | | | | | Bugs are now reported using a combination of "BugType" (previously BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which generates PathDiagnostics). This provides a far more modular way of registering bug types and plugging in diagnostics. GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the ExplodedGraph. ExplodedGraph is no longer templated on the "checker", but instead on the state contained in the nodes. llvm-svn: 49453
OpenPOWER on IntegriCloud