summaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
Commit message (Collapse)AuthorAge
...
* Experiment with not converting bug names to lower case.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50753 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate "stop" summaries for selectors involving receivers whose type is ↵Ted Kremenek2008-05-06
| | | | | | not NSxxxx. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50721 91177308-0d34-0410-b5e6-96231b3b80d8
* Use strncmp correctly.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50715 91177308-0d34-0410-b5e6-96231b3b80d8
* Make string comparison legible and remove buffer overrun introduced by typo.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50714 91177308-0d34-0410-b5e6-96231b3b80d8
* String comparison cleanups.Ted Kremenek2008-05-06
| | | | | | | Added test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50711 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix logic error in string processing.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50710 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove assertion.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50709 91177308-0d34-0410-b5e6-96231b3b80d8
* Use EvalSummary to process message expressions, thereby unifying the checkerTed Kremenek2008-05-06
| | | | | | | | | | | | | | logic for function calls and message expressions. Use the following heuristic to infer "allocating" instance methods: [ClassName classWithXXX] allocates an object Update testcase to reflect this heuristic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50708 91177308-0d34-0410-b5e6-96231b3b80d8
* Added receiver effects to EvalSummary.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50700 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand summaries to include "Receiver" effects.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50697 91177308-0d34-0410-b5e6-96231b3b80d8
* Added initialization code to generate initial set of ObjC method summaries ↵Ted Kremenek2008-05-06
| | | | | | (non-instance methods). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50690 91177308-0d34-0410-b5e6-96231b3b80d8
* Added code to generate initial set of summaries for instance methods.Ted Kremenek2008-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50689 91177308-0d34-0410-b5e6-96231b3b80d8
* Add summary generation for "initXXX" methods.Ted Kremenek2008-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50684 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CF retain diagnostics more succinct.Ted Kremenek2008-05-05
| | | | | | | In a leak's "name", indicate GC or non-GC bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50680 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial work on refactoring the CFRefCount checker so that it is moreTed Kremenek2008-05-05
| | | | | | | generic and handles reference counts for NSObjects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50674 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve leak diagnostics to not report a leak on the same line where Ted Kremenek2008-05-05
| | | | | | | | | | | | | | | | | the object was last used. This can be confusing to users. For example: // 'y' is leaked x = foo(y); instead: x = foo(y); // 'y' is leaked git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50661 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved leak diagnostics.Ted Kremenek2008-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50657 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor refactorings/cleanups in CF retain checker and added support for ↵Ted Kremenek2008-05-05
| | | | | | | | | NSMakeCollectable. Added test case for NSMakeCollectable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50653 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved diagnostics for leaks: now we report which variable was leaked.Ted Kremenek2008-05-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50588 91177308-0d34-0410-b5e6-96231b3b80d8
* When running the reference count checker twice (GC and non-GC mode), only emitTed Kremenek2008-05-02
| | | | | | | basic warnings (dead stores, null dereferences) on the first pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50584 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copy-paste bug.Ted Kremenek2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50557 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove no longer valid assertion.Ted Kremenek2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50556 91177308-0d34-0410-b5e6-96231b3b80d8
* Added line number diagnostics to indicate the allocation site of the leaked ↵Ted Kremenek2008-05-01
| | | | | | object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50553 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not highlight bogus ranges for leaks.Ted Kremenek2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50549 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly invalidate reference count state when passing objects by reference ↵Ted Kremenek2008-05-01
| | | | | | in message expressions we don't understand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50541 91177308-0d34-0410-b5e6-96231b3b80d8
* Renamed static method.Ted Kremenek2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50533 91177308-0d34-0410-b5e6-96231b3b80d8
* When processing "release", "retain", and "autorelease" messages return theTed Kremenek2008-05-01
| | | | | | | | | lval passed as an argument. Fix: Inverted diagnostic messages. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50513 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for "autorelease" message in CF ref. count checker.Ted Kremenek2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50512 91177308-0d34-0410-b5e6-96231b3b80d8
* added preliminary diagnostics in scan-build results to denote whetherTed Kremenek2008-04-30
| | | | | | | a CF memory leak occurred with GC enabled, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50507 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach more of the static analyzer about ObjCQualifiedIdType.Ted Kremenek2008-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50494 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the static analysis engine about ObjCQualifiedIdType.Ted Kremenek2008-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50493 91177308-0d34-0410-b5e6-96231b3b80d8
* Update typestate logic to support GC-mode.Ted Kremenek2008-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50396 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement semantics of CFMakeCollectable for the CF-reference count checker.Ted Kremenek2008-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50395 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide the option to run the CF-retain checker in GC enabled mode.Ted Kremenek2008-04-29
| | | | | | | The transfer functions for the checker don't do anything special yet in GC mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394 91177308-0d34-0410-b5e6-96231b3b80d8
* Do a better job at computing dead symbols.Ted Kremenek2008-04-25
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50241 91177308-0d34-0410-b5e6-96231b3b80d8
* Add preliminary support for flagging leaks around when they happen (doesn't ↵Ted Kremenek2008-04-24
| | | | | | work yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50237 91177308-0d34-0410-b5e6-96231b3b80d8
* CF reference count checker: handle variadic functions that allocate CF objects.Ted Kremenek2008-04-24
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50214 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed: <rdar://problem/5881148>Ted Kremenek2008-04-23
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50176 91177308-0d34-0410-b5e6-96231b3b80d8
* Added lval type (and tracking) for StringLiterals.Ted Kremenek2008-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize caching mechanism for bugs reports. Now individual BugTypesTed Kremenek2008-04-18
| | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49918 91177308-0d34-0410-b5e6-96231b3b80d8
* Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errorsTed Kremenek2008-04-18
| | | | | | | | | from registered BugTypes. This helps with debugging. Add detection of NULL values in ref count checker; this suppresses false positives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49912 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the ↵Ted Kremenek2008-04-18
| | | | | | node cache. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49907 91177308-0d34-0410-b5e6-96231b3b80d8
* More grammar fixes.Ted Kremenek2008-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49895 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix plurality debacle.Ted Kremenek2008-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49894 91177308-0d34-0410-b5e6-96231b3b80d8
* Added path diagnostics for reference counts.Ted Kremenek2008-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49892 91177308-0d34-0410-b5e6-96231b3b80d8
* BugReport::VisitNode now takes BugReporter& instead of ASTContext&.Ted Kremenek2008-04-18
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49889 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplified internal logic of BugReporter, consolidating EmitWarning andTed Kremenek2008-04-18
| | | | | | | | | EmitPathWarning into one method. We now properly handle emitting warnings without a PathDiagnosticClient when the warning does not involve a particular statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49884 91177308-0d34-0410-b5e6-96231b3b80d8
* Hook up reporting reference count memory leaks to the BugReporter mechanism.Ted Kremenek2008-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49879 91177308-0d34-0410-b5e6-96231b3b80d8
* Added transfer function support for ReturnStmt to support detecting leaksTed Kremenek2008-04-17
| | | | | | | involving objects that are returned but have an excessive reference count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49861 91177308-0d34-0410-b5e6-96231b3b80d8
* CF ref. count checker: Register memory leaks at the end of a path.Ted Kremenek2008-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49824 91177308-0d34-0410-b5e6-96231b3b80d8