summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-documentation.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-07 23:33:11 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-07 23:33:11 +0000
commita649eee9e877e690932c5b5c37b15f0668590feb (patch)
tree18d13e84b887e3e3894a495b28a22ddf54c5b32a /clang/test/Sema/warn-documentation.m
parent61e368182dcb5484109e338b0731ca3e30d4492a (diff)
downloadbcm5719-llvm-a649eee9e877e690932c5b5c37b15f0668590feb.tar.gz
bcm5719-llvm-a649eee9e877e690932c5b5c37b15f0668590feb.zip
HeaderDoc: Support more of HeaderDoc documentation
commands; top level tags such as @interface and their 2nd level tags such as @coclass, etc. // rdar://12379114 llvm-svn: 176667
Diffstat (limited to 'clang/test/Sema/warn-documentation.m')
-rw-r--r--clang/test/Sema/warn-documentation.m52
1 files changed, 52 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation.m b/clang/test/Sema/warn-documentation.m
index 5150955f63c..98c49935618 100644
--- a/clang/test/Sema/warn-documentation.m
+++ b/clang/test/Sema/warn-documentation.m
@@ -105,3 +105,55 @@ typedef int (^test_param1)(int aaa, int ccc);
typedef id ID;
- (unsigned) Base64EncodeEx : (ID)Arg;
@end
+
+// rdar://12379114
+// expected-warning@+5 {{'@interface' command should not be used in a comment attached to a non-interface declaration}}
+// expected-warning@+5 {{'@classdesign' command should not be used in a comment attached to a non-container declaration}}
+// expected-warning@+5 {{'@coclass' command should not be used in a comment attached to a non-container declaration}}
+@interface NSObject @end
+/*!
+@interface IOCommandGate
+@classdesign Multiple paragraphs go here.
+@coclass myCoClass
+*/
+
+typedef id OBJ;
+@interface IOCommandGate : NSObject {
+ OBJ iv;
+}
+@end
+
+// expected-warning@+2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
+/*!
+@protocol PROTO
+*/
+struct S;
+
+/*!
+ @interface NSArray This is an array
+*/
+@class NSArray;
+@interface NSArray @end
+
+/*!
+@interface NSMutableArray
+@super NSArray
+*/
+@interface NSMutableArray : NSArray @end
+
+/*!
+ @protocol MyProto
+*/
+@protocol MyProto @end
+
+// expected-warning@+2 {{'@protocol' command should not be used in a comment attached to a non-protocol declaration}}
+/*!
+ @protocol MyProto
+*/
+@interface INTF <MyProto> @end
+
+// expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
+/*!
+ @struct S1 THIS IS IT
+*/
+@interface S1 @end
OpenPOWER on IntegriCloud