// RUN: clang -fsyntax-only -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; typedef struct _NSZone NSZone; @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; @protocol NSObject - (BOOL)isEqual:(id)object; @end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone; @end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone; @end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end @interface NSObject { } @end extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); @interface NSValue : NSObject - (void)getValue:(void *)value; @end @class NSString; typedef struct _NSRange { } NSRange; @interface NSValue (NSValueRangeExtensions) + (NSValue *)valueWithRange:(NSRange)range; @end @interface NSAttributedString : NSObject - (NSString *)string; @end @interface NSMutableAttributedString : NSAttributedString - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; @end @class NSArray, NSDictionary, NSString, NSError; @interface NSScanner : NSObject - (NSString *)string; @end typedef struct { } CSSM_FIELDGROUP, *CSSM_FIELDGROUP_PTR; @protocol XDUMLClassifier; @protocol XDUMLClassInterfaceCommons // expected-warning {{cannot find protocol definition for 'XDUMLClassifier'}} @end @protocol XDUMLImplementation; @protocol XDUMLElement - (NSArray *) ownedElements; @end @protocol XDUMLDataType; @protocol XDUMLNamedElement - (NSString *) name; @end enum _XDSourceLanguage { XDSourceUnknown=0, XDSourceJava, XDSourceC, XDSourceCPP, XDSourceObjectiveC }; typedef NSUInteger XDSourceLanguage; @protocol XDSCClassifier - (XDSourceLanguage)language; @end @class XDSCDocController; @interface XDSCDisplaySpecification : NSObject { } @end @class XDSCOperation; @interface XDSCClassFormatter : NSObject { } + (NSUInteger) compartmentsForClassifier: (id ) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec; // expected-note {{previous definition is here}} @end @class NSString; @implementation XDSCClassFormatter + appendVisibility: (id ) element withSpecification: (XDSCDisplaySpecification *) displaySpec to: (NSMutableAttributedString *) attributedString { } // GCC doesn't currently warn about this. + (NSUInteger) compartmentsForClassifier: (id ) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec { // expected-warning {{conflicting types for 'compartmentsForClassifier:withSpecification:'}} } @end