diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-05 19:40:47 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-03-05 19:40:47 +0000 |
commit | bca9788dbaf5fcf241efdc82ddcda712cb22214e (patch) | |
tree | 3202fa56d48f01ba067e152f305d63934b6c7bca /test | |
parent | 971023066ce2a20aa693cc981412d015bac304b9 (diff) |
doc parsing. Add @method and @callback for
checkings and few other refactoring/cleanup.
// rdar://13094352.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Sema/warn-documentation.cpp | 22 | ||||
-rw-r--r-- | test/Sema/warn-documentation.m | 8 |
2 files changed, 20 insertions, 10 deletions
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index 8b38ddd81a..0e5fef823e 100644 --- a/test/Sema/warn-documentation.cpp +++ b/test/Sema/warn-documentation.cpp @@ -548,6 +548,18 @@ namespace test_returns_wrong_decl_10 { }; /// @returns Aaa typedef unsigned int test_returns_wrong_decl_11; +// rdar://13094352 +// expected-warning@+1 {{'@function' command used in a comment that is attached to a non-function declaration immediately following it}} +/*! @function test_function +*/ +typedef unsigned int Base64Flags; +unsigned test_function(Base64Flags inFlags); + +// expected-warning@+1 {{'@callback' command used in a comment that is attached to a non-callback declaration immediately following it}} +/*! @callback test_callback +*/ +typedef unsigned int BaseFlags; +unsigned (*test_callback)(BaseFlags inFlags); // expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}} /// \endverbatim @@ -910,13 +922,3 @@ int test_nocrash12(); // expected-warning@+1 {{empty paragraph passed to '@param' command}} ///@param x@param y int test_nocrash13(int x, int y); - -// expected-warning@+3 {{'@function' command used in a comment that is attached to a non-function declaration immediately following it}} -// expected-warning@+3 {{'@param' command used in a comment that is not attached to a function declaration}} -// expected-warning@+3 {{'@result' command used in a comment that is not attached to a function or method declaration}} -/*! @function Base64EncodeEx - @param inFlags This is error flag - @result Error -*/ -typedef unsigned int Base64Flags; -unsigned Base64EncodeEx(Base64Flags inFlags); diff --git a/test/Sema/warn-documentation.m b/test/Sema/warn-documentation.m index 8a894dca70..cfa84870e8 100644 --- a/test/Sema/warn-documentation.m +++ b/test/Sema/warn-documentation.m @@ -97,3 +97,11 @@ int b; /// \returns aaa. typedef int (^test_param1)(int aaa, int ccc); +// rdar://13094352 +// expected-warning@+2 {{'@method' command used in a comment that is attached to a non-method declaration immediately following it}} +@interface I +/*! @method Base64EncodeEx +*/ +typedef id ID; +- (unsigned) Base64EncodeEx : (ID)Arg; +@end |