diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-13 01:06:46 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-13 01:06:46 +0000 |
commit | abd56c816e9164b17bb3e7154a511b0c9896ffdb (patch) | |
tree | 1c46ada4b16e1e90bdc91413be5ebcd3da981db2 /test/Sema/warn-documentation.m | |
parent | bb39c3f8db1d8f1b40cf6f7d4c3a0cf110bc7639 (diff) |
Attaching comments to declarations during parsing: handle more Objective-C declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/warn-documentation.m')
-rw-r--r-- | test/Sema/warn-documentation.m | 70 |
1 files changed, 65 insertions, 5 deletions
diff --git a/test/Sema/warn-documentation.m b/test/Sema/warn-documentation.m index 0a02f7bb26..3a661c5ef4 100644 --- a/test/Sema/warn-documentation.m +++ b/test/Sema/warn-documentation.m @@ -2,11 +2,9 @@ @class NSString; -// expected-warning@+2 {{empty paragraph passed to '\brief' command}} -/** - * \brief\brief Aaa - */ -@interface A +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@interface Test1 // expected-warning@+2 {{empty paragraph passed to '\brief' command}} /** * \brief\brief Aaa @@ -20,5 +18,67 @@ * \param aab Aaa */ + (NSString *)test2:(NSString *)aaa; + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@property int test3; // a property: ObjCPropertyDecl + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@property int test4; // a property: ObjCPropertyDecl @end +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@interface Test1() +@end + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@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}} +/// \brief\brief Aaa +NSString *_test5; +@end + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@interface Test1(Test1Category) // a category: ObjCCategoryDecl +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa ++ (NSString *)test3:(NSString *)aaa; +@end + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@implementation Test1(Test1Category) // a category implementation: ObjCCategoryImplDecl ++ (NSString *)test3:(NSString *)aaa { + return 0; +} +@end + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@protocol TestProto1 // a protocol: ObjCProtocolDecl +@end + +int a; + +// expected-warning@+1 {{empty paragraph passed to '\brief' command}} +/// \brief\brief Aaa +@interface Test4 +@end + +int b; + |