2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
|
2008-12-11 04:07:25 +08:00
|
|
|
|
|
|
|
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 <NSObject> {
|
|
|
|
}
|
|
|
|
@end extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
|
|
|
|
@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value;
|
|
|
|
@end @class NSString;
|
|
|
|
typedef struct _NSRange {
|
|
|
|
}
|
|
|
|
NSRange;
|
|
|
|
@interface NSValue (NSValueRangeExtensions) + (NSValue *)valueWithRange:(NSRange)range;
|
|
|
|
@end @interface NSAttributedString : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSString *)string;
|
|
|
|
@end @interface NSMutableAttributedString : NSAttributedString - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str;
|
|
|
|
@end @class NSArray, NSDictionary, NSString, NSError;
|
|
|
|
@interface NSScanner : NSObject <NSCopying> - (NSString *)string;
|
|
|
|
@end typedef struct {
|
|
|
|
}
|
|
|
|
CSSM_FIELDGROUP, *CSSM_FIELDGROUP_PTR;
|
|
|
|
@protocol XDUMLClassifier;
|
2009-04-12 16:43:13 +08:00
|
|
|
@protocol XDUMLClassInterfaceCommons <XDUMLClassifier>
|
2008-12-11 06:14:21 +08:00
|
|
|
@end @protocol XDUMLImplementation;
|
2008-12-11 04:07:25 +08:00
|
|
|
@protocol XDUMLElement <NSObject> - (NSArray *) ownedElements;
|
|
|
|
@end @protocol XDUMLDataType;
|
|
|
|
@protocol XDUMLNamedElement <XDUMLElement> - (NSString *) name;
|
|
|
|
@end enum _XDSourceLanguage {
|
|
|
|
XDSourceUnknown=0, XDSourceJava, XDSourceC, XDSourceCPP, XDSourceObjectiveC };
|
|
|
|
typedef NSUInteger XDSourceLanguage;
|
|
|
|
@protocol XDSCClassifier <XDUMLClassInterfaceCommons> - (XDSourceLanguage)language;
|
|
|
|
@end @class XDSCDocController;
|
|
|
|
@interface XDSCDisplaySpecification : NSObject <NSCoding>{
|
|
|
|
}
|
|
|
|
@end @class XDSCOperation;
|
|
|
|
@interface XDSCClassFormatter : NSObject {
|
|
|
|
}
|
2010-10-06 05:02:11 +08:00
|
|
|
+ (NSUInteger) compartmentsForClassifier: (id <XDUMLClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec; // expected-note {{previous definition is here}}
|
2008-12-11 04:07:25 +08:00
|
|
|
@end
|
|
|
|
@class NSString;
|
|
|
|
@implementation XDSCClassFormatter
|
|
|
|
|
|
|
|
+ appendVisibility: (id <XDUMLNamedElement>) element withSpecification: (XDSCDisplaySpecification *) displaySpec to: (NSMutableAttributedString *) attributedString
|
|
|
|
{
|
2009-07-22 08:43:08 +08:00
|
|
|
return 0;
|
2008-12-11 04:07:25 +08:00
|
|
|
}
|
2010-10-06 05:02:11 +08:00
|
|
|
+ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec { // expected-warning {{conflicting parameter types in implementation of 'compartmentsForClassifier:withSpecification:'}}
|
2009-07-22 08:43:08 +08:00
|
|
|
return 0;
|
2008-12-11 04:07:25 +08:00
|
|
|
}
|
2009-03-24 10:24:46 +08:00
|
|
|
@end
|
2010-05-22 07:28:58 +08:00
|
|
|
|
|
|
|
// rdar: // 8006060
|
|
|
|
@interface Bar
|
|
|
|
- (void)foo:(id)format, ...; // expected-note {{previous declaration is here}}
|
|
|
|
- (void)foo1:(id)format; // expected-note {{previous declaration is here}}
|
|
|
|
@end
|
|
|
|
@implementation Bar
|
|
|
|
- (void)foo:(id)format {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}
|
|
|
|
- (void)foo1:(id)format, ... {}; // expected-warning {{conflicting variadic declaration of method and its implementation}}
|
|
|
|
@end
|
|
|
|
|