diff options
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 |