summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-288/+286
| | | | llvm-svn: 81346
* patch to prevent crash in hopelessly incorrectFariborz Jahanian2009-08-281-0/+1
| | | | | | method definition with labels. llvm-svn: 80381
* Don't issue warning on multiple selector found when Fariborz Jahanian2009-08-221-2/+3
| | | | | | selector name is for a @selector expression. llvm-svn: 79776
* Use Sema's LocInfoType to pass and preserve type source info through the Parser.Argyrios Kyrtzidis2009-08-191-2/+2
| | | | llvm-svn: 79395
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-1/+4
| | | | | | | | | | | | interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
* Fixed a regression in deciding when to issue warning on properties whichFariborz Jahanian2009-08-141-2/+4
| | | | | | implement NSCopying protocol in GC mode. llvm-svn: 79008
* error on property of objc interface type instead of crashingFariborz Jahanian2009-08-121-0/+2
| | | | llvm-svn: 78826
* Patch to warn if a property which is 'assign' by defaultFariborz Jahanian2009-08-111-1/+17
| | | | | | may not implement NSCopying protocol in -fobjc-gc[-only] mode. llvm-svn: 78726
* Canonicalize else.Mike Stump2009-08-041-27/+16
| | | | llvm-svn: 78102
* Some code refactoring. Be more generous in issuance of warningFariborz Jahanian2009-08-041-24/+34
| | | | | | on method type mismatches per Chris's comment. llvm-svn: 78075
* Compare matching selectors in current andFariborz Jahanian2009-08-041-0/+33
| | | | | | | super class(s) and warn on any parameter type mismatch if potentially unsafe. llvm-svn: 78029
* Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis2009-07-271-2/+2
| | | | | | ObjCContainerDecl now is the root class for objc decls that contain methods. llvm-svn: 77235
* Remove a bunch of FIXME's related to ObjC type checking.Steve Naroff2009-07-231-4/+5
| | | | | | | | - Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext. - Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible(). - Tweak several test cases to accommodate the new/improved type checking. llvm-svn: 76830
* Remove the ObjCCategoryImpls vector from Sema class.Argyrios Kyrtzidis2009-07-211-2/+0
| | | | | | Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality. llvm-svn: 76510
* Remove Sema::LookupObjCImplementation and replace it with just calling ↵Argyrios Kyrtzidis2009-07-211-4/+5
| | | | | | ObjCInterfaceDecl::getImplementation(). llvm-svn: 76509
* - Introduce ASTContext::getObjCImplementation() and ↵Argyrios Kyrtzidis2009-07-211-3/+27
| | | | | | | | | | | | ASTContext::setObjCImplementation() which use a DenseMap to associate an interface/category with its implementation (if one exists). - Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods. - Add a compiler error for when a category is reimplemented. llvm-svn: 76508
* Remove ASTContext::isObjCObjectPointerType().Steve Naroff2009-07-161-3/+5
| | | | | | Convert all clients to use the new predicate on Type. llvm-svn: 76076
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-1/+1
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* don't crash if class is using itself as its super class.Fariborz Jahanian2009-07-091-36/+42
| | | | llvm-svn: 75178
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-81/+74
| | | | | | | 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
* Support dependent extended vector types and template instantiationDouglas Gregor2009-06-171-6/+6
| | | | | | thereof. Patch by Anders Johnsen! llvm-svn: 73641
* Adds synthesize ivars to DeclContext.Fariborz Jahanian2009-06-061-1/+6
| | | | llvm-svn: 73000
* More refactoring/cleanup of objc ivars.Fariborz Jahanian2009-06-041-22/+11
| | | | llvm-svn: 72871
* (Next runtime only) check to see if class implements forwardInvocation method Fariborz Jahanian2009-05-221-17/+34
| | | | | | | | | and objects of this class are derived from 'NSProxy'. Under such conditions, which means that every method possible is implemented in the class, we should not issue "Method definition not found" warnings. llvm-svn: 72267
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-1/+1
| | | | llvm-svn: 72210
* Reflow some comments.Mike Stump2009-05-161-13/+11
| | | | llvm-svn: 71936
* Don't warn if result/argument type of an implemented Fariborz Jahanian2009-05-141-2/+5
| | | | | | | method is a qualified id which conforms to the matching type of its method declaration. llvm-svn: 71817
* Method attributes may only be specified on methodFariborz Jahanian2009-05-121-0/+4
| | | | | | declarations. llvm-svn: 71597
* Fixes a bug in my last patch. Order of types reversed.Fariborz Jahanian2009-05-081-2/+1
| | | | llvm-svn: 71267
* Refactoring of my last patch.Fariborz Jahanian2009-05-081-16/+23
| | | | llvm-svn: 71248
* More type checking for properties, accessors andFariborz Jahanian2009-05-081-6/+12
| | | | | | use of dot-syntax expression. This is to match gcc's. llvm-svn: 71243
* Add a warning for a missing copy attribute on a property that is aMike Stump2009-05-071-0/+5
| | | | | | block pointer. Radar 6441502 llvm-svn: 71190
* a forward class declaration matching a typedef name of a classFariborz Jahanian2009-05-071-0/+7
| | | | | | | refers to the underlying class. This is radar 6859726. Steve, please read the radar for my rational. llvm-svn: 71181
* Remove support for ObjCMethodDecl attributes that appear between theTed Kremenek2009-05-041-4/+0
| | | | | | | | return type and the selector. This is inconsistent with C functions (where such attributes would be placed on the return type, not the the FunctionDecl), and is inconsistent with what people are use to seeing. llvm-svn: 70878
* Check for method type conflict between declaration inFariborz Jahanian2009-05-011-37/+85
| | | | | | | | class/protocol and implementation which could be an imm. implementation or down in the inheritance hierarchy. llvm-svn: 70568
* Use of super class ivar to synthesize property is back to being error.Fariborz Jahanian2009-04-301-1/+1
| | | | llvm-svn: 70514
* Hook up Sema support for attributes on Objective-C method declarations thatTed Kremenek2009-04-301-0/+4
| | | | | | | | | | | | | appear between the return type and the selector. This is a separate code path from regular attribute processing, as we only want to (a) accept only a specific set of attributes in this place and (b) want to distinguish to clients the context in which an attribute was added to an ObjCMethodDecl. Currently, the attribute 'objc_ownership_returns' is the only attribute that uses this new feature. Shortly I will add a warning for 'objc_ownership_returns' to be placed at the end of a method declaration. llvm-svn: 70504
* Change to warning when property uses an ivar in super classFariborz Jahanian2009-04-291-1/+1
| | | | | | in an @synthesize diective, as it breaks few projects. llvm-svn: 70441
* use of an ivar specified on a property @synthesizeFariborz Jahanian2009-04-291-2/+1
| | | | | | and found in super class triggers a diagnostics. llvm-svn: 70414
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-261-2/+2
| | | | llvm-svn: 70145
* Fix a pasto in the lookup of instance methods in the global poolDouglas Gregor2009-04-241-2/+2
| | | | llvm-svn: 69996
* PCH support for the global method pool (= instance and factory methodDouglas Gregor2009-04-241-3/+93
| | | | | | | | pools, combined). The methods in the global method pool are lazily loaded from an on-disk hash table when Sema looks into its version of the hash tables. llvm-svn: 69989
* Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but alsoDouglas Gregor2009-04-241-5/+1
| | | | | | | updates name lookup so that we see through @compatibility_alias declarations to their underlying interfaces. llvm-svn: 69950
* Fix Objective-C crashesDouglas Gregor2009-04-241-3/+0
| | | | llvm-svn: 69945
* Eliminate Sema::ObjCInterfaceDeclsDouglas Gregor2009-04-241-10/+2
| | | | llvm-svn: 69942
* Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's ↵Douglas Gregor2009-04-241-7/+4
| | | | | | | | | | | good for uniformity is good for PCH (or is it the other way around?). As part of this, make ObjCImplDecl inherit from NamedDecl (since ObjCImplementationDecls now need to have names so that they can be found). This brings ObjCImplDecl very, very close to ObjCContainerDecl; we may be able to merge them soon. llvm-svn: 69941
* Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls inDouglas Gregor2009-04-231-9/+6
| | | | | | | | | | | | their own namespace (IDNS_Protocol) and use the normal name-lookup routines to find them. Aside from the simplification this provides (one less DenseMap!), it means that protocols will be lazily deserialized from PCH files. Make the code size of the selector table block match the code size of the type and decl blocks. llvm-svn: 69939
* Diagnose if an implementation implements a forward classFariborz Jahanian2009-04-231-1/+3
| | | | | | declaration (and avoid issuing bogus error later on). llvm-svn: 69928
* Remove @compatibility_alias regression.Steve Naroff2009-04-231-1/+2
| | | | llvm-svn: 69899
* More PushOnScopeChain() FIXME's.Steve Naroff2009-04-231-4/+2
| | | | llvm-svn: 69894
OpenPOWER on IntegriCloud