aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ARCMigrate/TransGCAttrs.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/ARCMigrate/TransGCAttrs.cpp b/lib/ARCMigrate/TransGCAttrs.cpp
index fa62b36208..de710abb5d 100644
--- a/lib/ARCMigrate/TransGCAttrs.cpp
+++ b/lib/ARCMigrate/TransGCAttrs.cpp
@@ -183,30 +183,6 @@ public:
} // anonymous namespace
-static void clearRedundantStrongs(MigrationContext &MigrateCtx) {
- TransformActions &TA = MigrateCtx.Pass.TA;
-
- for (unsigned i = 0, e = MigrateCtx.GCAttrs.size(); i != e; ++i) {
- MigrationContext::GCAttrOccurrence &Attr = MigrateCtx.GCAttrs[i];
- if (Attr.Kind == MigrationContext::GCAttrOccurrence::Strong &&
- Attr.FullyMigratable && Attr.Dcl) {
- TypeSourceInfo *TInfo = 0;
- if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(Attr.Dcl))
- TInfo = DD->getTypeSourceInfo();
- else if (ObjCPropertyDecl *PD = dyn_cast<ObjCPropertyDecl>(Attr.Dcl))
- TInfo = PD->getTypeSourceInfo();
- if (!TInfo)
- continue;
-
- if (TInfo->getType().getObjCLifetime() == Qualifiers::OCL_Strong) {
- Transaction Trans(TA);
- TA.remove(Attr.Loc);
- MigrateCtx.RemovedAttrSet.insert(Attr.Loc.getRawEncoding());
- }
- }
- }
-}
-
static void errorForGCAttrsOnNonObjC(MigrationContext &MigrateCtx) {
TransformActions &TA = MigrateCtx.Pass.TA;
@@ -354,7 +330,6 @@ void GCAttrsTraverser::traverseTU(MigrationContext &MigrateCtx) {
GCAttrsCollector(MigrateCtx, AllProps).TraverseDecl(
MigrateCtx.Pass.Ctx.getTranslationUnitDecl());
- clearRedundantStrongs(MigrateCtx);
errorForGCAttrsOnNonObjC(MigrateCtx);
checkAllProps(MigrateCtx, AllProps);
checkWeakGCAttrs(MigrateCtx);