summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix up lookup rules for properties declared inFariborz Jahanian2009-04-021-26/+0
| | | | | | objc's continuation class. llvm-svn: 68339
* Fix a bug in declaration of property in continuationFariborz Jahanian2009-04-011-0/+10
| | | | | | | class which was exposed by implementation of objc2's nonfragile abi code gen. llvm-svn: 68259
* Nonfragile ivar synthesis with property is in a continuationFariborz Jahanian2009-04-011-0/+16
| | | | | | class. llvm-svn: 68234
* simplify some castingChris Lattner2009-03-311-7/+4
| | | | llvm-svn: 68098
* fe support for objc2's nonfragile-abi synthesized ivars.Fariborz Jahanian2009-03-311-0/+10
| | | | llvm-svn: 68077
* Fix <rdar://problem/6619539> incompatible pointer types sending ↵Steve Naroff2009-03-011-0/+13
| | | | | | | | | 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?). - Reworked ASTContext::canAssignObjCInterfaces(). - Added ObjCProtocolDecl::lookupProtocolNamed(). llvm-svn: 65773
* "This patch addresses two FIXME on ObjCCategoryImplDecl:Chris Lattner2009-02-281-56/+6
| | | | | | | | | | | | | /// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl! /// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar). And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl" Patch by Jean-Daniel Dupas! llvm-svn: 65703
* Fix ObjCInterfaceDecl::lookupInstanceMethod()/lookupClassMethod() to search ↵Steve Naroff2009-02-261-3/+11
| | | | | | | | | | in inherited protocols. Also changed ObjCInterfaceDecl::lookupClassMethod() to look through a categories protocols. Test/patch submitted by Jean-Daniel Dupas (thanks!). llvm-svn: 65526
* Contains the following (related to problems found while investigting ↵Steve Naroff2009-02-221-9/+31
| | | | | | | | | | <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. llvm-svn: 65292
* allocate and dellocate objc decl list through AST Context instead ofChris Lattner2009-02-201-2/+3
| | | | | | | | | with new/delete. With disable-free, this reduces the number of 4/8 byte mallocs from 4793/1541 to 865/456 and also drops other sizes as well. This is a very small perf win, nothing major. llvm-svn: 65171
* add plumbing to get ASTContext& down to allocation/deallocation points in ↵Chris Lattner2009-02-201-19/+29
| | | | | | | | ObjCList, but don't start using it yet. Renamed some methods to be more consistent. llvm-svn: 65168
* newly factored, we can now move the set and destroy methods out of line.Chris Lattner2009-02-201-0/+20
| | | | llvm-svn: 65166
* rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is calledChris Lattner2009-02-201-6/+6
| | | | | | before the dtor. llvm-svn: 65156
* rearrange the contents of DeclObjC to be by-class. Fix some 80 column issuesChris Lattner2009-02-201-328/+367
| | | | | | and other non-semantic changes. llvm-svn: 65155
* destroy should forward to base class.Chris Lattner2009-02-201-0/+1
| | | | llvm-svn: 65151
* move the @implementation ivar list to being an ObjCList, which preventsChris Lattner2009-02-201-12/+6
| | | | | | it from being leaked, among other things. llvm-svn: 65150
* remove some slow O(n) methods.Chris Lattner2009-02-201-19/+0
| | | | llvm-svn: 65132
* Change ObjCForwardProtocolDecl to use an ObjCList.Chris Lattner2009-02-201-11/+6
| | | | llvm-svn: 65131
* move the interace list of @class to use ObjCList.Chris Lattner2009-02-201-16/+3
| | | | llvm-svn: 65129
* remove a dead list.Chris Lattner2009-02-201-2/+1
| | | | llvm-svn: 65127
* switch ObjCMethodDecl's parameter list from being explicitly managed to an ↵Chris Lattner2009-02-201-14/+1
| | | | | | ObjCList. llvm-svn: 65114
* switch the interface ivar list from being explicitly managed to using ObjCList.Chris Lattner2009-02-201-17/+2
| | | | llvm-svn: 65113
* move more objc destruction out of dtors into Destroy.Chris Lattner2009-02-201-11/+42
| | | | llvm-svn: 65112
* move some objc decl destruction out of dtors into Destroy method.Chris Lattner2009-02-201-6/+9
| | | | llvm-svn: 65111
* All Decls have a DeclContext now, hooray! Fans of consistency rejoice.Argyrios Kyrtzidis2009-02-171-4/+4
| | | | | | Pass the DeclContext to ObjCIvarDecls as well. llvm-svn: 64801
* Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionallyFariborz Jahanian2009-02-161-16/+0
| | | | | | the same. llvm-svn: 64657
* wrap long lines.Chris Lattner2009-02-161-6/+8
| | | | llvm-svn: 64650
* Remove many references to ASTContext::getAllocator(), replacing them with ↵Steve Naroff2009-01-271-27/+14
| | | | | | | | calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate(). This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness. llvm-svn: 63135
* Remove ScopedDecl, collapsing all of its functionality into Decl, soDouglas Gregor2009-01-201-4/+3
| | | | | | | | | | | | | | | | that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. llvm-svn: 62562
* Patch to allow @dynamic synthesis of property in a category,Fariborz Jahanian2009-01-191-2/+11
| | | | | | with @synthesize being illegal. llvm-svn: 62515
* Fix crasher due to use-after-release: DeclContext now owns all ↵Ted Kremenek2009-01-121-18/+0
| | | | | | ObjCMethodDecls, and shouldn't be released elsewhere. llvm-svn: 62113
* Patch to supprt case of readonly property being Fariborz Jahanian2009-01-121-28/+0
| | | | | | | | assigned to when it has user declared setter method defined in the class implementation (but no declaration in the class itself). llvm-svn: 62098
* Convert property implementation to DeclContext::addDecl().Steve Naroff2009-01-111-13/+1
| | | | | | This completes the ObjCContainerDecl AST cleanup (for now). llvm-svn: 62037
* A few property related cleanups to ObjCContainerDecl AST.Steve Naroff2009-01-111-0/+6
| | | | llvm-svn: 62034
* Explicit declaration of property setters over-rideFariborz Jahanian2009-01-101-1/+7
| | | | | | prohibition of 'readonly' properties in an assignment. llvm-svn: 62028
* This patch removes mergeProperties and does the property lookupFariborz Jahanian2009-01-091-25/+10
| | | | | | in designated protocols lazily. llvm-svn: 62007
* Provide a new kind of iterator, the specific_decl_iterator, thatDouglas Gregor2009-01-091-1/+1
| | | | | | | | | filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. llvm-svn: 61994
* Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).Steve Naroff2009-01-091-102/+27
| | | | | | | | | Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. llvm-svn: 61988
* Fix crash on null deference when searching for readwrite properties inDaniel Dunbar2009-01-091-13/+15
| | | | | | | categories. - Also, simplify nesting via early return. llvm-svn: 61968
* Addressed the issue in <rdar://problem/6479085>, where we failed toDouglas Gregor2009-01-091-18/+20
| | | | | | | | | | | | | | | rewrite @class declarations that showed up within linkage specifications because those @class declarations never made it any place where the rewriter could find them. Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can live in the appropriate top-level or transparent DeclContext near the top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C declarations now show up in a traversal of the declarations in a DeclContext (they didn't before!). This way, the rewriter finds all Objective-C declarations within linkage specifications. llvm-svn: 61966
* Fix ObjCInterfaceDecl::Destroy and ObjCProtocolDecl::Destroy to iterate and ↵Ted Kremenek2009-01-081-10/+4
| | | | | | destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind. llvm-svn: 61943
* Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.Steve Naroff2009-01-081-72/+0
| | | | | | Moved logic to Sema::ProcessPropertyDecl(). llvm-svn: 61936
* Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).Steve Naroff2009-01-081-6/+7
| | | | | | | | Convert clients to use the standard getDeclContext() API. Doug, thanks for the review! llvm-svn: 61935
* This is a large/messy diff that unifies the ObjC AST's with DeclContext.Steve Naroff2009-01-081-83/+44
| | | | | | | | | | | | | | | - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. llvm-svn: 61929
* ObjC AST cleanups/simplifications (phase 1).Steve Naroff2009-01-071-49/+6
| | | | | | Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it. llvm-svn: 61866
* Fixed a bug showed up the meta-data for protocol Fariborz Jahanian2008-12-221-2/+10
| | | | | | | instance methods by building print-class-info.m, whose output is now identical to what gcc puts out. llvm-svn: 61339
* Fix http://llvm.org/bugs/show_bug.cgi?id=3189.Steve Naroff2008-12-181-2/+2
| | | | llvm-svn: 61202
* This patch will build the Records lazily per Steve's comments.Fariborz Jahanian2008-12-171-42/+3
| | | | | | | Note that one test duplicate-ivar-check.m will fail because I need to re-implement duplicate ivar checking. llvm-svn: 61154
* Added comment to Steve's patch to clarify the case.Fariborz Jahanian2008-12-171-0/+3
| | | | llvm-svn: 61144
* Fix <rdar://problem/6450964> clang on xcode: Assertion failed: ↵Steve Naroff2008-12-171-0/+2
| | | | | | | | | | (RecordForDecl && "lookupFieldDeclForIvar no storage for class"). This was a recent regression caused by r61043 (related to code gen. for ivar references). Fariborz, please review. I have some other concerns related to code generation for ivars that we can discuss later. llvm-svn: 61134
OpenPOWER on IntegriCloud