aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CheckObjCDealloc.cpp
AgeCommit message (Collapse)Author
2008-12-08'self.myIvar = nil' (properties) only releases myIvar when the property has ↵Ted Kremenek
kind 'assign'. This fixes <rdar://problem/6380411>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60717 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-24Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner
uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-22New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian
Issuing diagnostics when assigning to read-only properties. This is work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04Add a new expression class, ObjCSuperExpr, to handle the Objective-C ↵Douglas Gregor
'super'. Remove ObjCThis from PredefinedExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30Distinguish between self.X = ... where self.X is a property reference and ↵Ted Kremenek
self.X is an implicit call to setX. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58462 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-30Patch by Nikita Zhuk:Ted Kremenek
Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property: http://llvm.org/bugs/show_bug.cgi?id=2978 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29Patch by Nikita Zhuk:Ted Kremenek
The attached patch adds additional checks to -warn-objc-missing-dealloc. It checks that all ivars which are used in implementation of synthesized properties are either a) released in dealloc if the property has retain" or "copy" attribute OR b) not released in dealloc if the property has "assign" attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10rename PreDefinedExpr -> PredefinedExprChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25Remove call to isSEL and isSEL itself since the call is dead ↵Ted Kremenek
(isObjCObjectPointerType() will never return true for selectors). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25Only warn about missing/incomplete -dealloc implementations when a class ↵Ted Kremenek
contains a non-SEL, non-IBOutlet ivar that references an ObjC object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54024 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24Use ASTContext::isObjCObjectPointerType() to check if an ivar is a reference ↵Ted Kremenek
to an Objective-C object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24Don't issue a missing +dealloc warning for classes that just contain SEL ivars.Ted Kremenek
This fixes PR 2592: http://llvm.org/bugs/show_bug.cgi?id=2592 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53987 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15For the MissingDealloc check, don't treat IBOutlet ivars as being needed to ↵Ted Kremenek
be released git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53647 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14Added method "EmitBasicReport" to BugReporter to simplify the emission of ↵Ted Kremenek
simple bug diagnostics. Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11Fix comment.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53473 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-07Do not emit a "missing -dealloc" warning if a class contains no ivars that ↵Ted Kremenek
are pointers. This patch aims to address some of the concerns of PR 2517: http://llvm.org/bugs/show_bug.cgi?id=2517 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53168 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03Skip the "-dealloc" check if a ObjC class contains no ivars.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53100 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03For the -dealloc checker, check the LangOptions to determine whether or not ↵Ted Kremenek
the code is compiled with GC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53098 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03Added static analysis check to see if a subclass of NSObject implements ↵Ted Kremenek
-dealloc, and whether or not that implementation calls [super dealloc]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53075 91177308-0d34-0410-b5e6-96231b3b80d8