From: Dmitri Gribenko Date: Mon, 4 Mar 2013 19:39:33 +0000 (+0000) Subject: warn-documentation.cpp: reorganize tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=151b2ac8c84fe751871dcdb041efec655fab70eb;p=clang warn-documentation.cpp: reorganize tests Tests are ordered by command in this file. It is nice to keep it that way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176445 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp index f9eb458ce8..220f84508f 100644 --- a/test/Sema/warn-documentation.cpp +++ b/test/Sema/warn-documentation.cpp @@ -303,6 +303,11 @@ typedef int (*test_param27)(int aaa); /// \param aaa Meow. typedef test_param27 test_param28; +// rdar://13066276 +// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}} +/// @param aaa Meow. +typedef unsigned int test_param29; + // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}} /// \tparam T Aaa @@ -438,6 +443,14 @@ template void test_deprecated_7(T aaa); +// rdar://12397511 +// expected-note@+2 {{previous command '\headerfile' here}} +// expected-warning@+2 {{duplicated command '\headerfile'}} +/// \headerfile "" +/// \headerfile foo.h +int test__headerfile_1(int a); + + /// \invariant aaa void test_invariant_1(int a); @@ -524,6 +537,11 @@ enum test_returns_wrong_decl_8 { /// \returns Aaa namespace test_returns_wrong_decl_10 { }; +// rdar://13066276 +// expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}} +/// @returns Aaa +typedef unsigned int test_returns_wrong_decl_11; + // expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}} /// \endverbatim @@ -887,31 +905,3 @@ int test_nocrash12(); ///@param x@param y int test_nocrash13(int x, int y); -// rdar://12397511 - -// expected-note@+2 {{previous command '\headerfile' here}} -// expected-warning@+2 {{duplicated command '\headerfile'}} -/// \headerfile "" -/// \headerfile foo.h -int test_duplicate_headerfile1(int); - - -// rdar://13066276 -// expected-warning@+1 {{'@return' command used in a comment that is not attached to a function or method declaration}} -/** @return s */ -struct s* f(void); -struct s; - -// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}} -/** \return s */ -struct q* g(void); -struct q; - -// 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);