1f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuctypedef signed char BOOL; 4f4a2713aSLionel Sambuctypedef unsigned int NSUInteger; 5f4a2713aSLionel Sambuctypedef struct _NSZone NSZone; 6f4a2713aSLionel Sambuc@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; 7f4a2713aSLionel Sambuc@protocol NSObject - (BOOL)isEqual:(id)object; @end 8f4a2713aSLionel Sambuc@protocol NSCopying - (id)copyWithZone:(NSZone *)zone; @end // expected-note {{method 'copyWithZone:' declared here}} 9f4a2713aSLionel Sambuc@protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone; @end 10f4a2713aSLionel Sambuc@protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end 11f4a2713aSLionel Sambuc@interface NSObject <NSObject> {} @end 12f4a2713aSLionel Sambuctypedef struct {} NSFastEnumerationState; 13f4a2713aSLionel Sambuc@protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; @end 14f4a2713aSLionel Sambuc@interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> - (NSUInteger)count; @end 15f4a2713aSLionel Sambuc@interface NSMutableDictionary : NSDictionary - (void)removeObjectForKey:(id)aKey; @end // expected-note {{receiver is instance of class declared here}} 16f4a2713aSLionel Sambucextern NSString * const NSTaskDidTerminateNotification; 17f4a2713aSLionel Sambuc 18*0a6a1f1dSLionel Sambuc@interface XCPropertyExpansionContext : NSObject <NSCopying> { 19f4a2713aSLionel Sambuc NSMutableDictionary * _propNamesToPropValuesCache; 20f4a2713aSLionel Sambuc} @end 21f4a2713aSLionel Sambuc 22f4a2713aSLionel Sambuc@protocol XCPropertyValues <NSObject, NSCopying> 23f4a2713aSLionel Sambuc- (NSString *)evaluateAsStringInContext:(XCPropertyExpansionContext *)context withNestingState:(const void *)state; 24f4a2713aSLionel Sambuc@end 25f4a2713aSLionel Sambuc 26*0a6a1f1dSLionel Sambuc@implementation XCPropertyExpansionContext // expected-warning {{method 'copyWithZone:' in protocol 'NSCopying' not implemented}} 27f4a2713aSLionel Sambuc- (NSString *)expandedValueForProperty:(NSString *)property { 28f4a2713aSLionel Sambuc id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}} 29f4a2713aSLionel Sambuc if (cachedValueNode == ((void *)0)) { } 30f4a2713aSLionel Sambuc NSString * expandedValue = [cachedValueNode evaluateAsStringInContext:self withNestingState:((void *)0)]; 31f4a2713aSLionel Sambuc return expandedValue; 32f4a2713aSLionel Sambuc} 33f4a2713aSLionel Sambuc@end 34