From dc9166c8e1120dc0df1859ba6e3d457a458fd20f Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 15 Dec 2011 20:29:51 +0000 Subject: Keep track of all declarations of an Objective-C class (both forward declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" llvm-svn: 146679 --- clang/lib/ARCMigrate/Transforms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/ARCMigrate/Transforms.cpp') diff --git a/clang/lib/ARCMigrate/Transforms.cpp b/clang/lib/ARCMigrate/Transforms.cpp index e208e8471bd..21df2578727 100644 --- a/clang/lib/ARCMigrate/Transforms.cpp +++ b/clang/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; -- cgit v1.2.3