aboutsummaryrefslogtreecommitdiff
path: root/lib/ARCMigrate
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ARCMigrate')
-rw-r--r--lib/ARCMigrate/Transforms.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ARCMigrate/Transforms.cpp b/lib/ARCMigrate/Transforms.cpp
index e208e8471b..21df257872 100644
--- a/lib/ARCMigrate/Transforms.cpp
+++ b/lib/ARCMigrate/Transforms.cpp
@@ -80,7 +80,7 @@ bool trans::canApplyWeak(ASTContext &Ctx, QualType type,
ObjCInterfaceDecl *Class = ObjT->getInterfaceDecl();
if (!AllowOnUnknownClass && (!Class || Class->getName() == "NSObject"))
return false; // id/NSObject is not safe for weak.
- if (!AllowOnUnknownClass && Class->isForwardDecl())
+ if (!AllowOnUnknownClass && !Class->hasDefinition())
return false; // forward classes are not verifiable, therefore not safe.
if (Class->isArcWeakrefUnavailable())
return false;