diff options
Diffstat (limited to 'clang/lib/ARCMigrate')
| -rw-r--r-- | clang/lib/ARCMigrate/ObjCMT.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp index 34cc073044a..45e1dea96a4 100644 --- a/clang/lib/ARCMigrate/ObjCMT.cpp +++ b/clang/lib/ARCMigrate/ObjCMT.cpp @@ -412,8 +412,12 @@ void ObjCMigrateASTConsumer::migrateObjCInterfaceDecl(ASTContext &Ctx, ObjCMethodDecl *Method = (*M); if (Method->isDeprecated()) continue; - migrateProperty(Ctx, D, Method); - if (ASTMigrateActions & FrontendOptions::ObjCMT_Annotation) + bool PropertyInferred = migrateProperty(Ctx, D, Method); + // If a property is inferred, do not attempt to attach NS_RETURNS_INNER_POINTER to + // the getter method as it ends up on the property itself which we don't want + // to do unless -objcmt-returns-innerpointer-property option is on. + if (!PropertyInferred || + (ASTMigrateActions & FrontendOptions::ObjCMT_ReturnsInnerPointerProperty)) migrateNsReturnsInnerPointer(Ctx, Method); } if (!(ASTMigrateActions & FrontendOptions::ObjCMT_ReturnsInnerPointerProperty)) |

