Przeglądaj źródła

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

Fariborz Jahanian 12 lat temu
rodzic
commit
aa58f15d82

+ 0 - 1
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") ||

+ 1 - 1
test/ARCMT/objcmt-instancetype-2.m.result

@@ -79,7 +79,7 @@ typedef enum NSURLBookmarkResolutionOptions {
 @end
 
 @interface NSNotificationCenter
-+ (instancetype) defaultCenter;
++ (id) defaultCenter;
 @end
 
 @interface UIApplication