From: Fariborz Jahanian Date: Mon, 7 Oct 2013 20:41:53 +0000 (+0000) Subject: ObjectiveC migrator: A typical implementation of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa58f15d824096639ec2c5dcab903cbdfe0e14b4;p=clang ObjectiveC migrator: A typical implementation of 'default' methods in Foundation does not infer 'instancetype' for methods' result type. // rdar://15145218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192129 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index a3eafe2b59..2c70b9933a 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -465,7 +465,6 @@ ObjCInstanceTypeFamily Selector::getInstTypeMethodFamily(Selector sel) { break; case 'd': if (startsWithWord(name, "dictionary")) return OIT_Dictionary; - if (startsWithWord(name, "default")) return OIT_Singleton; break; case 's': if (startsWithWord(name, "shared") || diff --git a/test/ARCMT/objcmt-instancetype-2.m.result b/test/ARCMT/objcmt-instancetype-2.m.result index 89ce243335..199430b755 100644 --- a/test/ARCMT/objcmt-instancetype-2.m.result +++ b/test/ARCMT/objcmt-instancetype-2.m.result @@ -79,7 +79,7 @@ typedef enum NSURLBookmarkResolutionOptions { @end @interface NSNotificationCenter -+ (instancetype) defaultCenter; ++ (id) defaultCenter; @end @interface UIApplication