summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckObjCDealloc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split libAnalysis into two libraries: libAnalysis and libChecker.Ted Kremenek2010-01-251-258/+0
| | | | | | | | | | | | | | | | | | | | | | | | | (1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
* Port BugReporter and BugType to StringRef.Benjamin Kramer2009-11-291-4/+3
| | | | llvm-svn: 90086
* Fix checking for a null pointer constant when the expression itself isDouglas Gregor2009-09-251-2/+4
| | | | | | | | | | | | value-dependent. Audit (and fixed) all calls to Expr::isNullPointerConstant() to provide the correct behavior with value-dependent expressions. Fixes PR5041 and a crash in libstdc++ <locale>. In the same vein, properly compute value- and type-dependence for ChooseExpr. Fixes PR4996. llvm-svn: 82748
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-61/+61
| | | | llvm-svn: 81346
* Remove 'AnalysisContext::setDecl()', as we the Decl associated with anTed Kremenek2009-08-211-2/+2
| | | | | | | AnalysisContext should never change. Along the way, propagate some constness around. llvm-svn: 79701
* Remove ASTContext::isObjCObjectPointerType().Steve Naroff2009-07-161-2/+2
| | | | | | Convert all clients to use the new predicate on Type. llvm-svn: 76076
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-4/+4
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-1/+1
| | | | llvm-svn: 73702
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-4/+4
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-181-2/+2
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* Per PR 3187, disable the missing -dealloc check for classes that subclass ↵Ted Kremenek2009-02-111-3/+15
| | | | | | SenTestCase. llvm-svn: 64292
* 'self.myIvar = nil' (properties) only releases myIvar when the property has ↵Ted Kremenek2008-12-081-2/+5
| | | | | | kind 'assign'. This fixes <rdar://problem/6380411>. llvm-svn: 60717
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-4/+5
| | | | | | | | | | | 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. llvm-svn: 59947
* New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian2008-11-221-2/+1
| | | | | | | Issuing diagnostics when assigning to read-only properties. This is work in progress. llvm-svn: 59874
* Add a new expression class, ObjCSuperExpr, to handle the Objective-C ↵Douglas Gregor2008-11-041-3/+1
| | | | | | 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
* Distinguish between self.X = ... where self.X is a property reference and ↵Ted Kremenek2008-10-301-1/+2
| | | | | | self.X is an implicit call to setX. llvm-svn: 58462
* Patch by Nikita Zhuk:Ted Kremenek2008-10-301-11/+43
| | | | | | | | 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 llvm-svn: 58431
* Patch by Nikita Zhuk:Ted Kremenek2008-10-291-3/+82
| | | | | | | | | 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 llvm-svn: 58363
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-2/+2
| | | | llvm-svn: 54605
* Remove call to isSEL and isSEL itself since the call is dead ↵Ted Kremenek2008-07-251-10/+1
| | | | | | (isObjCObjectPointerType() will never return true for selectors). llvm-svn: 54034
* Only warn about missing/incomplete -dealloc implementations when a class ↵Ted Kremenek2008-07-251-6/+7
| | | | | | contains a non-SEL, non-IBOutlet ivar that references an ObjC object. llvm-svn: 54024
* Use ASTContext::isObjCObjectPointerType() to check if an ivar is a reference ↵Ted Kremenek2008-07-241-3/+3
| | | | | | to an Objective-C object. llvm-svn: 53999
* Don't issue a missing +dealloc warning for classes that just contain SEL ivars.Ted Kremenek2008-07-241-1/+10
| | | | | | This fixes PR 2592: http://llvm.org/bugs/show_bug.cgi?id=2592 llvm-svn: 53987
* For the MissingDealloc check, don't treat IBOutlet ivars as being needed to ↵Ted Kremenek2008-07-151-2/+4
| | | | | | be released llvm-svn: 53647
* Added method "EmitBasicReport" to BugReporter to simplify the emission of ↵Ted Kremenek2008-07-141-32/+11
| | | | | | | | simple bug diagnostics. Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification). llvm-svn: 53560
* Fix comment.Ted Kremenek2008-07-111-2/+3
| | | | llvm-svn: 53473
* Do not emit a "missing -dealloc" warning if a class contains no ivars that ↵Ted Kremenek2008-07-071-3/+19
| | | | | | | | are pointers. This patch aims to address some of the concerns of PR 2517: http://llvm.org/bugs/show_bug.cgi?id=2517 llvm-svn: 53168
* Skip the "-dealloc" check if a ObjC class contains no ivars.Ted Kremenek2008-07-031-2/+7
| | | | llvm-svn: 53100
* For the -dealloc checker, check the LangOptions to determine whether or not ↵Ted Kremenek2008-07-031-4/+14
| | | | | | the code is compiled with GC. llvm-svn: 53098
* Added static analysis check to see if a subclass of NSObject implements ↵Ted Kremenek2008-07-031-0/+118
-dealloc, and whether or not that implementation calls [super dealloc]. llvm-svn: 53075
OpenPOWER on IntegriCloud