summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-08 01:46:34 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-08 01:46:34 +0000
commitbab8a96f2f509218bc1a25d67bc182581d65e50e (patch)
treea994fe755cc4162606d8c860ed630e2d5b1d9aaf /clang/lib/Serialization/ASTReader.cpp
parentaf3d4af4ebec2c519823a745665729ded3f9bbce (diff)
downloadbcm5719-llvm-bab8a96f2f509218bc1a25d67bc182581d65e50e.tar.gz
bcm5719-llvm-bab8a96f2f509218bc1a25d67bc182581d65e50e.zip
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>. llvm-svn: 139275
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 37a23faf0dc..251d0f6e317 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -4126,6 +4126,10 @@ Decl *ASTReader::GetDecl(DeclID ID) {
case PREDEF_DECL_UNSIGNED_INT_128_ID:
assert(Context && "No context available?");
return Context->getUInt128Decl();
+
+ case PREDEF_DECL_OBJC_INSTANCETYPE_ID:
+ assert(Context && "No context available?");
+ return Context->getObjCInstanceTypeDecl();
}
return 0;
OpenPOWER on IntegriCloud