]> granicus.if.org Git - clang/commit
Implement the Objective-C 'instancetype' type, which is an alias of
authorDouglas Gregor <dgregor@apple.com>
Thu, 8 Sep 2011 01:46:34 +0000 (01:46 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 8 Sep 2011 01:46:34 +0000 (01:46 +0000)
commite97179c675b341927807c718be215c8d1aab8acb
treeb1dbf4795e91cd0cea64fc6c3085952b76860141
parent4fe4d73bce7aba5446dcbfa36ee8782c6d496710
Implement the Objective-C 'instancetype' type, which is an alias of
'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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
docs/LanguageExtensions.html
include/clang/AST/ASTContext.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTContext.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Parse/ParseObjc.cpp
lib/Parse/Parser.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaType.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/PCH/objc_methods.h
test/PCH/objc_methods.m
test/SemaObjC/instancetype.m [new file with mode: 0644]