1 // RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
3 typedef signed char BOOL;
4 typedef unsigned int NSUInteger;
5 typedef struct _NSZone NSZone;
6 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
7 @protocol NSObject - (BOOL)isEqual:(id)object;
8 @end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone;
9 @end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone;
10 @end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
11 @end @interface NSObject <NSObject> {
13 @end extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
14 @interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value;
16 typedef struct _NSRange {
19 @interface NSValue (NSValueRangeExtensions) + (NSValue *)valueWithRange:(NSRange)range;
20 @end @interface NSAttributedString : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSString *)string;
21 @end @interface NSMutableAttributedString : NSAttributedString - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str;
22 @end @class NSArray, NSDictionary, NSString, NSError;
23 @interface NSScanner : NSObject <NSCopying> - (NSString *)string;
26 CSSM_FIELDGROUP, *CSSM_FIELDGROUP_PTR;
27 @protocol XDUMLClassifier;
28 @protocol XDUMLClassInterfaceCommons <XDUMLClassifier>
29 @end @protocol XDUMLImplementation;
30 @protocol XDUMLElement <NSObject> - (NSArray *) ownedElements;
31 @end @protocol XDUMLDataType;
32 @protocol XDUMLNamedElement <XDUMLElement> - (NSString *) name;
33 @end enum _XDSourceLanguage {
34 XDSourceUnknown=0, XDSourceJava, XDSourceC, XDSourceCPP, XDSourceObjectiveC };
35 typedef NSUInteger XDSourceLanguage;
36 @protocol XDSCClassifier <XDUMLClassInterfaceCommons> - (XDSourceLanguage)language;
37 @end @class XDSCDocController;
38 @interface XDSCDisplaySpecification : NSObject <NSCoding>{
40 @end @class XDSCOperation;
41 @interface XDSCClassFormatter : NSObject {
43 + (NSUInteger) compartmentsForClassifier: (id <XDUMLClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec; // expected-note {{previous definition is here}}
46 @implementation XDSCClassFormatter
48 + appendVisibility: (id <XDUMLNamedElement>) element withSpecification: (XDSCDisplaySpecification *) displaySpec to: (NSMutableAttributedString *) attributedString
52 + (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec { // expected-warning {{conflicting parameter types in implementation of 'compartmentsForClassifier:withSpecification:'}}
59 - (void)foo:(id)format, ...; // expected-note {{previous declaration is here}}
60 - (void)foo1:(id)format; // expected-note {{previous declaration is here}}
63 - (void)foo:(id)format {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}
64 - (void)foo1:(id)format, ... {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}