2012-08-24 08:05:30 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-objc-root-class -Wdocumentation -Wdocumentation-pedantic -verify %s
|
2012-07-12 05:38:39 +08:00
|
|
|
|
|
|
|
@class NSString;
|
|
|
|
|
2012-07-13 09:06:46 +08:00
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@interface Test1
|
2012-07-12 05:38:39 +08:00
|
|
|
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
|
|
|
|
/**
|
2012-08-07 01:08:27 +08:00
|
|
|
* \brief\author Aaa
|
2012-07-12 05:38:39 +08:00
|
|
|
* \param aaa Aaa
|
|
|
|
* \param bbb Bbb
|
|
|
|
*/
|
|
|
|
+ (NSString *)test1:(NSString *)aaa suffix:(NSString *)bbb;
|
|
|
|
|
|
|
|
// expected-warning@+2 {{parameter 'aab' not found in the function declaration}} expected-note@+2 {{did you mean 'aaa'?}}
|
|
|
|
/**
|
|
|
|
* \param aab Aaa
|
|
|
|
*/
|
|
|
|
+ (NSString *)test2:(NSString *)aaa;
|
2012-07-13 09:06:46 +08:00
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@property int test3; // a property: ObjCPropertyDecl
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@property int test4; // a property: ObjCPropertyDecl
|
2012-07-12 05:38:39 +08:00
|
|
|
@end
|
|
|
|
|
2012-07-13 09:06:46 +08:00
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@interface Test1()
|
|
|
|
@end
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@implementation Test1 // a class implementation : ObjCImplementationDecl
|
|
|
|
+ (NSString *)test1:(NSString *)aaa suffix:(NSString *)bbb {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (NSString *)test2:(NSString *)aaa {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@synthesize test3; // a property implementation: ObjCPropertyImplDecl
|
|
|
|
@dynamic test4; // a property implementation: ObjCPropertyImplDecl
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
NSString *_test5;
|
|
|
|
@end
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@interface Test1(Test1Category) // a category: ObjCCategoryDecl
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
+ (NSString *)test3:(NSString *)aaa;
|
|
|
|
@end
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@implementation Test1(Test1Category) // a category implementation: ObjCCategoryImplDecl
|
|
|
|
+ (NSString *)test3:(NSString *)aaa {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@protocol TestProto1 // a protocol: ObjCProtocolDecl
|
|
|
|
@end
|
|
|
|
|
|
|
|
int a;
|
|
|
|
|
|
|
|
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
|
2012-08-07 01:08:27 +08:00
|
|
|
/// \brief\author Aaa
|
2012-07-13 09:06:46 +08:00
|
|
|
@interface Test4
|
|
|
|
@end
|
|
|
|
|
|
|
|
int b;
|
|
|
|
|
2012-08-07 00:29:26 +08:00
|
|
|
@interface TestReturns1
|
|
|
|
/// \returns Aaa
|
|
|
|
- (int)test1:(NSString *)aaa;
|
|
|
|
|
|
|
|
// expected-warning@+1 {{'\returns' command used in a comment that is attached to a method returning void}}
|
|
|
|
/// \returns Aaa
|
|
|
|
- (void)test2:(NSString *)aaa;
|
|
|
|
@end
|
|
|
|
|
2012-08-25 01:45:39 +08:00
|
|
|
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
|
2012-08-24 08:05:30 +08:00
|
|
|
/// \param aaa Meow.
|
|
|
|
/// \param bbb Bbb.
|
|
|
|
/// \returns aaa.
|
2012-08-25 01:45:39 +08:00
|
|
|
typedef int (^test_param1)(int aaa, int ccc);
|
2012-08-24 08:05:30 +08:00
|
|
|
|
2013-03-06 03:40:47 +08:00
|
|
|
// rdar://13094352
|
2013-03-07 01:55:30 +08:00
|
|
|
// expected-warning@+2 {{'@method' command should be used in a comment attached to an Objective-C method declaration}}
|
2013-03-06 03:40:47 +08:00
|
|
|
@interface I
|
|
|
|
/*! @method Base64EncodeEx
|
|
|
|
*/
|
|
|
|
typedef id ID;
|
|
|
|
- (unsigned) Base64EncodeEx : (ID)Arg;
|
|
|
|
@end
|