llvm::SmallVector<DeclPtrTy, 8> ProtocolRefs;
if (Tok.is(tok::less) &&
- ParseObjCProtocolReferences(ProtocolRefs, true, EndProtoLoc))
+ ParseObjCProtocolReferences(ProtocolRefs, false, EndProtoLoc))
return DeclPtrTy();
DeclPtrTy ProtoType =
}
}
-/// ActOnForwardProtocolDeclaration -
+/// ActOnForwardProtocolDeclaration - Handle @protocol foo;
Action::DeclPtrTy
Sema::ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc,
const IdentifierLocPair *IdentList,
@end @class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
@class JabasectItem;
@protocol EcoClassifier;
-@protocol EcoClassInterfaceCommons <EcoClassifier> @end @protocol EcoImplementation; // expected-warning{{cannot find protocol}}
+@protocol EcoClassInterfaceCommons <EcoClassifier> @end @protocol EcoImplementation;
@protocol EcoBehavioredClassifier <EcoClassInterfaceCommons> - (NSArray *) implementations;
@end enum {
CK_UNRESTRICTED= 0, CK_READ_ONLY, CK_ADD_ONLY, CK_REMOVE_ONLY };
@protocol EcoClass <EcoBehavioredClassifier> - (NSArray *) ownedAttributes;
@end @protocol EcoNamespace;
@protocol EcoType;
-@protocol EcoClassifier <EcoNamespace,EcoType> - (NSArray *) features; // expected-warning 2 {{cannot find protocol}}
+@protocol EcoClassifier <EcoNamespace,EcoType> - (NSArray *) features;
@end @protocol EcoComment;
@protocol EcoElement <NSObject> - (NSArray *) ownedElements;
@end @protocol EcoDirectedRelationship;
}
CSSM_FIELDGROUP, *CSSM_FIELDGROUP_PTR;
@protocol XDUMLClassifier;
-@protocol XDUMLClassInterfaceCommons <XDUMLClassifier> // expected-warning {{cannot find protocol definition for 'XDUMLClassifier'}}
+@protocol XDUMLClassInterfaceCommons <XDUMLClassifier>
@end @protocol XDUMLImplementation;
@protocol XDUMLElement <NSObject> - (NSArray *) ownedElements;
@end @protocol XDUMLDataType;
// RUN: clang-cc -fsyntax-only -verify %s
@protocol B;
-@protocol C < B > // expected-warning{{cannot find protocol definition for 'B'}} // expected-note{{previous definition is here}}
+@protocol C < B > // expected-note{{previous definition is here}}
@end
@protocol A < C >
@end
- (INTF1<p1>*) meth;
@end
-@protocol PROTO2<p1> // expected-warning {{cannot find protocol definition for 'p1'}}
+@protocol PROTO2<p1>
@end
@protocol p1 @end
@protocol p2 <p1>
@end
-@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3'}}
+@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3>
+@end
+
+
+// rdar://6771034
+@protocol XX;
+@protocol YY <XX> // Use of declaration of XX here should not cause a warning.
+- zz;
@end
- (BOOL)anchor:(OzzyAnchor *)anchor confirmRepresentedObject:(id)newObject;
@end
typedef NSObject <OzzyAnchorDelegateP> OzzyAnchorDelegate;
-// GCC doesn't warn about the following (which is inconsistent with it's handling of @interface below).
-@protocol OzzyAnchorP <OzzyP> // expected-warning{{cannot find protocol definition for 'OzzyP'}}
+
+@protocol OzzyAnchorP <OzzyP>
@property(nonatomic,retain) id representedObject;
@property(nonatomic,retain) Ozzy * contentGroup;
@end