1 // RUN: %clang_cc1 -pedantic -fsyntax-only -verify %s
2 typedef signed char BOOL;
4 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
7 - (BOOL)isEqual:(id)object;
11 - (void)encodeWithCoder:(NSCoder *)aCoder;
14 @interface NSObject <NSObject> {}
17 typedef float CGFloat;
19 @interface NSResponder : NSObject <NSCoding> {}
22 @protocol XCSelectionSource;
24 @interface XCSelection : NSResponder {}
25 - (NSObject <XCSelectionSource> *) source;
28 extern NSString * const XCActiveSelectionLevel;
30 @interface XCActionManager : NSResponder {}
31 +defaultActionManager;
32 -selectionAtLevel:(NSString *const)s;
35 @implementation XDMenuItemsManager // expected-warning {{cannot find interface declaration for 'XDMenuItemsManager'}}
37 id<XCSelectionSource, NSObject> source =
38 [[[XCActionManager defaultActionManager] selectionAtLevel:XCActiveSelectionLevel] source];
42 @protocol NSTextStorageDelegate;
43 @class NSNotification;
45 @interface NSTextStorage : NSObject
47 - (void)setDelegate:(id <NSTextStorageDelegate>)delegate; // expected-note{{passing argument to parameter 'delegate' here}}
48 - (id <NSTextStorageDelegate>)delegate;
52 @protocol NSTextStorageDelegate <NSObject>
55 - (void)textStorageWillProcessEditing:(NSNotification *)notification;
56 - (void)textStorageDidProcessEditing:(NSNotification *)notification;
60 @interface SKTText : NSObject {
64 NSTextStorage *_contents;
68 @implementation SKTText
71 - (NSTextStorage *)contents {
72 [_contents setDelegate:self]; // expected-warning {{sending 'SKTText *' to parameter of incompatible type 'id<NSTextStorageDelegate>'}}