declaration (and avoid issuing bogus error later on).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69928
91177308-0d34-0410-b5e6-
96231b3b80d8
} 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
@implementation INTF4 @end // expected-warning {{cannot find interface declaration for 'INTF4'}}
+@class INTF5;
+
+@implementation INTF5 { // expected-warning {{cannot find interface declaration for 'INTF5'}}
+ int x;
+}
+@end
+
// RUN: clang-cc -fsyntax-only -verify %s
-@class PBXTrackableTaskManager;
+@interface PBXTrackableTaskManager @end
@implementation PBXTrackableTaskManager
- (id) init {}