summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/objc_methods.h
Commit message (Collapse)AuthorAgeFilesLines
* [PCH] Really, pinky swear, fix for PR12689Argyrios Kyrtzidis2012-05-041-0/+14
| | | | | | rdar://11353109 llvm-svn: 156145
* [PCH] Clear switch case IDs when deserializing a objc method body.Argyrios Kyrtzidis2012-05-031-0/+16
| | | | | | Fixes rdar://11353109 & http://llvm.org/bugs/show_bug.cgi?id=12689 llvm-svn: 156056
* Implement the Objective-C 'instancetype' type, which is an alias ofDouglas Gregor2011-09-081-1/+1
| | | | | | | | | | 'id' that can be used (only!) via a contextual keyword as the result type of an Objective-C message send. 'instancetype' then gives the method a related result type, which we have already been inferring for a variety of methods (new, alloc, init, self, retain). Addresses <rdar://problem/9267640>. llvm-svn: 139275
* Implement Objective-C Related Result Type semantics.Douglas Gregor2011-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id llvm-svn: 132868
* More PushOnScopeChain() FIXME's.Steve Naroff2009-04-231-0/+5
| | | | llvm-svn: 69894
* rename methods.* -> objc_methods.*Chris Lattner2009-04-221-0/+6
llvm-svn: 69778
OpenPOWER on IntegriCloud