summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remove a helper method.Chris Lattner2008-07-261-2/+4
| | | | llvm-svn: 54101
* Pull protocol resolution of out ActOnStartClassInterface, this is also the Chris Lattner2008-07-261-18/+3
| | | | | | last client of the old ParseObjCProtocolReferences, so it also removes it. llvm-svn: 54094
* refactor protocol resolution out of ActOnStartCategoryInterfaceChris Lattner2008-07-261-18/+3
| | | | llvm-svn: 54093
* pull protocol resolution out into ActOnStartProtocolInterface.Chris Lattner2008-07-261-21/+9
| | | | | | | This temporarily duplicates ParseObjCProtocolReferences, but it will be removed in the future. llvm-svn: 54092
* simplify some code.Chris Lattner2008-07-261-7/+15
| | | | llvm-svn: 54091
* remove duplicate error message.Chris Lattner2008-07-261-6/+6
| | | | llvm-svn: 54090
* Move fix in r54013 from the parser to sema.Steve Naroff2008-07-251-2/+5
| | | | llvm-svn: 54032
* minor cleanup to the actions interface to pass around SmallVectorImpl insteadChris Lattner2008-07-211-41/+42
| | | | | | | | | | | | | | | | | | | | | | of a specific smallvector size. Fix protocol lists to pass down proper location info, so we get diagnostics like this: t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ instead of this: t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation> llvm-svn: 53883
* move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,Chris Lattner2008-07-211-15/+14
| | | | | | simplifying code along the way and fixing a problem and memory leak or two. llvm-svn: 53876
* add forward definition protocols to the protocol list for a class.Chris Lattner2008-07-211-13/+16
| | | | llvm-svn: 53864
* references to completely undeclared protocols should be errors. Chris Lattner2008-07-211-10/+16
| | | | | | References to forward definitions should be warnings. llvm-svn: 53863
* introduce a new ObjCList templated class and start moving Chris Lattner2008-07-211-3/+5
| | | | | | | various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl. llvm-svn: 53856
* rename setReferencedProtocolList -> addReferencedProtocols toChris Lattner2008-07-211-1/+1
| | | | | | be consistent with ObjCInterfaceDecl. llvm-svn: 53852
* Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++.Argyrios Kyrtzidis2008-07-211-3/+3
| | | | llvm-svn: 53849
* Switch initialization of the protocol list for an interface decl to useChris Lattner2008-07-211-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | the standard "set these as the list of protocols" interface instead of a strange "set this as the size and then set each one to the value" interface. The problem with the later is that it a) is completely different from everything else, b) is awkward, and c) doesn't handle the case when a referenced protocol is invalid: it set it to null. This meant that all clients downstream would have to handle null protocols in the protocol list, and empirically they didn't. Fix this by not setting invalid protocols in the referenced protocol list, fixing the crash on test/Sema/objc-interface-1.m While I'm at it, clean up some locations so that we produce: t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ~~~~~~~~~~~~~~~~~~~~~ ^ instead of: t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever' @interface NSWhatever : NSObject <NSCopying> ^ llvm-svn: 53846
* Fix warningsSeo Sanghyeon2008-07-051-1/+2
| | | | llvm-svn: 53141
* Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() ↵Argyrios Kyrtzidis2008-06-281-5/+3
| | | | | | and getCurMethodDecl() that return the appropriate Decl through CurContext. llvm-svn: 52852
* The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl ↵Argyrios Kyrtzidis2008-06-251-1/+1
| | | | | | instead of CurFunctionDecl. llvm-svn: 52719
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-171-4/+4
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: ↵Steve Naroff2008-06-051-3/+12
| | | | | | redefinition of 'XCElementToggler' as different kind of symbol llvm-svn: 52024
* Fixed a recent test regression from last night (r51976).Steve Naroff2008-06-051-4/+4
| | | | llvm-svn: 52006
* Fix <rdar://problem/5986833> clang on xcode: incompatible type returning ↵Steve Naroff2008-06-051-2/+4
| | | | | | | | | 'void', expected 'int'. - Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods. - Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup. llvm-svn: 52005
* Fix trivial crasher and downgrade an error to warning (to match GCC).Steve Naroff2008-06-051-2/+2
| | | | llvm-svn: 51976
* Make sure the source location for @property points the the @-sign (not the ↵Steve Naroff2008-05-221-0/+4
| | | | | | | | decl spec). Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST. llvm-svn: 51450
* Synthesized getter/setter method declarations need not haveFariborz Jahanian2008-05-071-1/+2
| | | | | | | an implementation. This fixes couple of failing prperty tests caused by my previous patch. llvm-svn: 50830
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-071-8/+13
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* Patch to refactor setter/getter names of property attributes into SelectorFariborz Jahanian2008-05-061-2/+4
| | | | | | | (was IdentifierInfo * before). This will make method declartations whole lot easier. llvm-svn: 50747
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-051-1/+7
| | | | | | properties declared in the protocol. llvm-svn: 50662
* This patch is about merging ObjC2's properties declared in classFariborz Jahanian2008-05-021-12/+69
| | | | | | | protocols into class's property list and performing semantics on them for while doing so. llvm-svn: 50587
* Patch to match and issue diagnostics on property type mismatch.Fariborz Jahanian2008-05-011-8/+4
| | | | llvm-svn: 50532
* More ObjC2 property semantics work. Work in progress.Fariborz Jahanian2008-05-011-20/+30
| | | | llvm-svn: 50508
* Use PushOnScopeChains to introduce a decl into scope.Argyrios Kyrtzidis2008-04-271-4/+2
| | | | llvm-svn: 50320
* Patch to diagnose inconsistancies between properties declared in current andFariborz Jahanian2008-04-241-0/+68
| | | | | | its super class. This patch is incomplete. llvm-svn: 50228
* Patch to build AST for property implementation declarations andFariborz Jahanian2008-04-231-16/+18
| | | | | | to print declaration from its AST. llvm-svn: 50117
* More semantics checks of properties. Property implementation can implicitly useFariborz Jahanian2008-04-211-5/+4
| | | | | | | ivar of same name. Better diagnostics to bring home this point. llvm-svn: 50065
* Support for @dynamic AST build.Fariborz Jahanian2008-04-211-7/+19
| | | | | | | More property semantics checking. First test case for ObjC2's property implementation. llvm-svn: 50057
* Continuation of work on ObjC2's properties.Fariborz Jahanian2008-04-211-36/+15
| | | | | | | | Added iterators, methods to find property and categories. Use them in doing semantic analysis on property implementation declarations. Fixed typos. llvm-svn: 50050
* Fixed a bug in categories and properties.Fariborz Jahanian2008-04-181-1/+1
| | | | llvm-svn: 49883
* Initial work for property implementation declarations.Fariborz Jahanian2008-04-181-1/+112
| | | | | | | Mostly semantic checking in this patch. This is on going and incomplete. llvm-svn: 49882
* Added property decl support for protocols.Fariborz Jahanian2008-04-171-3/+5
| | | | | | | Added assertion if unexpected property decls are found where they don't belong. Consolidated property decl. printing by using a helper function. llvm-svn: 49862
* This patch adds support for declaraing properties in categories,Fariborz Jahanian2008-04-161-0/+3
| | | | | | just as they are declared in objc classes. llvm-svn: 49817
* New AST representation for each objc2's property declaration.Fariborz Jahanian2008-04-141-16/+5
| | | | llvm-svn: 49699
* AST generation for objc2's property declarations.Fariborz Jahanian2008-04-111-19/+28
| | | | llvm-svn: 49565
* Add class and super class location info to ObjCInterfaceDecl...Steve Naroff2008-04-111-3/+4
| | | | llvm-svn: 49553
* Switch sema to maintaining its own scope chain information for variableChris Lattner2008-04-111-2/+3
| | | | | | | shadowing, instead of threading it through the AST. This patch contributed by Argiris Kirtzidis! llvm-svn: 49520
* Several improvements from Doug Gregor related to defaultChris Lattner2008-04-101-1/+1
| | | | | | argument handling. I'll fix up the c89 (void) thing next. llvm-svn: 49459
* Add support for C++ default arguments, and rework Parse-Sema Chris Lattner2008-04-081-16/+15
| | | | | | | | interaction for function parameters, fixing PR2046. Patch by Doug Gregor! llvm-svn: 49369
* remove the Decl::getCanonicalType() method.Chris Lattner2008-04-061-1/+2
| | | | llvm-svn: 49295
* This patch contains these changes:Chris Lattner2008-04-061-1/+1
| | | | | | | | | | -Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! llvm-svn: 49261
* Introduce ContextDecl, patch by Argiris Kirtzidis!Chris Lattner2008-04-041-16/+19
| | | | | | | | | | | -Added ContextDecl (no TranslationUnitDecl) -ScopedDecl class has a ContextDecl member -FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily -FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context. -Moved Decl class to a "DeclBase.h" along with ContextDecl class -CurContext is handled by Sema llvm-svn: 49208
OpenPOWER on IntegriCloud