diff options
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 3c544ed377..6702eb9a7a 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -623,8 +623,10 @@ Sema::DeclPtrTy Sema::ActOnStartClassImplementation( } else { // Is there an interface declaration of this class; if not, warn! IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); - if (!IDecl) + if (!IDecl || IDecl->isForwardDecl()) { Diag(ClassLoc, diag::warn_undef_interface) << ClassName; + IDecl = 0; + } } // Check that super class name is valid class name |