blob: c0b929de446f24d027b3852ee1bc63bcdbbf5e68 [file] [log] [blame]
// RUN: %clang_cc1 -pedantic -fsyntax-only -verify -Wno-objc-root-class %s
typedef signed char BOOL;
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
@protocol NSObject
- (BOOL)isEqual:(id)object;
@protocol NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder;
@interface NSObject <NSObject> {}
typedef float CGFloat;
@interface NSResponder : NSObject <NSCoding> {}
@protocol XCSelectionSource;
@interface XCSelection : NSResponder {}
- (NSObject <XCSelectionSource> *) source;
extern NSString * const XCActiveSelectionLevel;
@interface XCActionManager : NSResponder {}
-selectionAtLevel:(NSString *const)s;
@implementation XDMenuItemsManager // expected-warning {{cannot find interface declaration for 'XDMenuItemsManager'}}
+ (void)initialize {
id<XCSelectionSource, NSObject> source =
[[[XCActionManager defaultActionManager] selectionAtLevel:XCActiveSelectionLevel] source];
@protocol NSTextStorageDelegate;
@class NSNotification;
@interface NSTextStorage : NSObject
- (void)setDelegate:(id <NSTextStorageDelegate>)delegate; // expected-note{{passing argument to parameter 'delegate' here}}
- (id <NSTextStorageDelegate>)delegate;
@protocol NSTextStorageDelegate <NSObject>
- (void)textStorageWillProcessEditing:(NSNotification *)notification;
- (void)textStorageDidProcessEditing:(NSNotification *)notification;
@interface SKTText : NSObject {
NSTextStorage *_contents;
@implementation SKTText
- (NSTextStorage *)contents {
[_contents setDelegate:self]; // expected-warning {{sending 'SKTText *' to parameter of incompatible type 'id<NSTextStorageDelegate>'}}
return 0;