diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-08 01:15:17 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-08 01:15:17 +0000 |
commit | ec7cea925e7687bf34ddc186d63ff734453612a8 (patch) | |
tree | 034faebf55d7a2a61876f5ea5167a1a20a064148 /clang/lib/ARCMigrate | |
parent | a464f3d43a58a28cf5bbacbe6e0f74519367b697 (diff) | |
download | bcm5719-llvm-ec7cea925e7687bf34ddc186d63ff734453612a8.tar.gz bcm5719-llvm-ec7cea925e7687bf34ddc186d63ff734453612a8.zip |
ObjectiveC migrator. Fixes an obscure bug where
NS_RETURNS_INNER_POINTER ends up unintentionally
on the @property under -objcmt-migrate-all
// rdar://15396636
llvm-svn: 194233
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)) |