// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s
// RUN: %clang_cc1 -std=c++14 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s
// This file contains lots of corner cases, so ensure that XML we generate is not invalid.
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s | FileCheck %s -check-prefix=WRONG
// WRONG-NOT: CommentXMLInvalid
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{expected quoted string after equals sign}}
/// <a href=>
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{expected quoted string after equals sign}}
/// <a href==>
int ;
// expected-warning@+3 {{HTML tag 'a' requires an end tag}}
// expected-warning@+2 {{expected quoted string after equals sign}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a href= blah
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a =>
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a "aaa">
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" =>
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" "aaa">
int ;
// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" =
int ;
// expected-warning@+2 {{HTML start tag prematurely ended, expected attribute name or '>'}} expected-note@+1 {{HTML tag started here}}
/** Aaa bbb<img ddd eee
* fff ggg.
*/
int ;
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/** Aaa bbb<img ddd eee 42%
* fff ggg.
*/
int ;
// expected-warning@+1 {{HTML end tag 'br' is forbidden}}
/// <br></br>
int ;
/// <blockquote>Meow</blockquote>
int ;
/// <b><i>Meow</i></b>
int ;
/// <p>Aaa<br>
/// Bbb</p>
int ;
/// <p>Aaa<br />
/// Bbb</p>
int ;
// expected-warning@+3 {{HTML tag 'b' requires an end tag}}
// expected-warning@+2 {{HTML tag 'i' requires an end tag}}
// expected-warning@+1 {{HTML end tag does not match any start tag}}
/// <b><i>Meow</a>
int ;
// expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
// expected-warning@+1 {{HTML end tag does not match any start tag}}
/// <b><i>Meow</b></b>
int ;
// expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
// expected-warning@+1 {{HTML end tag does not match any start tag}}
/// <b><i>Meow</b></i>
int ;
// expected-warning@+1 {{HTML tag 'b' requires an end tag}}
/// <b>Meow
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\returns Aaa
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief \returns Aaa
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief
/// \returns Aaa
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief
///
/// \returns Aaa
int ;
// There is trailing whitespace on one of the following lines, don't remove it!
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief
///
/// \returns Aaa
int ;
/// \brief \c Aaa
int ;
// We don't recognize comments in double quotes.
/// "\brief \returns Aaa"
int ;
// But only if they're single-line. (Doxygen treats multi-line quotes inconsistently.)
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// "\brief
/// \returns Aaa"
int ;
// expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\brief' here}}
/// \brief Aaa
///
/// Bbb
///
/// \brief Ccc
int ;
// expected-warning@+5 {{duplicated command '\short'}} expected-note@+1 {{previous command '\short' here}}
/// \short Aaa
///
/// Bbb
///
/// \short Ccc
int ;
// expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\short' (an alias of '\brief') here}}
/// \short Aaa
///
/// Bbb
///
/// \brief Ccc
int ;
/// \return Aaa
///
/// Bbb
///
/// \return Ccc
int ;
/// \returns Aaa
///
/// Bbb
///
/// \returns Ccc
int ;
/// \result Aaa
///
/// Bbb
///
/// \result Ccc
int ;
/// \returns Aaa
///
/// Bbb
///
/// \return Ccc
int ;
/// expected-warning@+1 {{empty paragraph passed to '\retval' command}}
/// \retval 0
int ;
/// \retval 0 Everything is fine.
int ;
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param a Blah blah.
int test_param1_backslash;
// rdar://13066276
// Check that the diagnostic uses the same command marker as the comment.
// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
/// @param a Blah blah.
int test_param1_at;
// expected-warning@+1 {{empty paragraph passed to '\param' command}}
/// \param
/// \param a Blah blah.
int ;
// expected-warning@+1 {{empty paragraph passed to '\param' command}}
/// \param a
int ;
/// \param a Blah blah.
int ;
/// \param [in] a Blah blah.
int ;
/// \param [out] a Blah blah.
int ;
/// \param [in,out] a Blah blah.
int ;
// expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
/// \param [ in ] a Blah blah.
int ;
// expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
/// \param [in, out] a Blah blah.
int ;
// expected-warning@+1 {{unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'}}
/// \param [ junk] a Blah blah.
int ;
// expected-warning@+1 {{parameter 'a' not found in the function declaration}}
/// \param a Blah blah.
int ;
// expected-warning@+1 {{parameter 'A' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}}
/// \param A Blah blah.
int ;
// expected-warning@+1 {{parameter 'aab' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
/// \param aab Blah blah.
int ;
// expected-warning@+2 {{parameter 'aab' not found in the function declaration}} expected-note@+2 {{did you mean 'bbb'?}}
/// \param aaa Blah blah.
/// \param aab Blah blah.
int ;
// expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
/// \param aab Blah blah.
int ;
// expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
/// \param aab Ccc.
/// \param aaa Aaa.
/// \param bbb Bbb.
int ;
// expected-warning@+2 {{parameter 'aab' not found in the function declaration}}
/// \param aaa Aaa.
/// \param aab Ccc.
/// \param bbb Bbb.
int ;
// expected-warning@+3 {{parameter 'aab' not found in the function declaration}}
/// \param aaa Aaa.
/// \param bbb Bbb.
/// \param aab Ccc.
int ;
;
// expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
/// \param aab Blah blah.
void ;
// expected-warning@+3 {{parameter 'a' is already documented}}
// expected-note@+1 {{previous documentation}}
/// \param a Aaa.
/// \param a Aaa.
int ;
// expected-warning@+4 {{parameter 'x2' is already documented}}
// expected-note@+2 {{previous documentation}}
/// \param x1 Aaa.
/// \param x2 Bbb.
/// \param x2 Ccc.
int ;
// expected-warning@+1 {{empty paragraph passed to '\param' command}}
/// \param a
/// \retval 0 Blah blah.
int ;
/// \param a \ref test_param23 has an empty paragraph, this doesn't.
int ;
//===---
// Test that we treat typedefs to some non-function types as functions for the
// purposes of documentation comment parsing.
//===---
;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef foo::function_wrapper<int > test_function_like_typedef5;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef foo::function_wrapper<int > *test_function_like_typedef6;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef foo::function_wrapper<int > &test_function_like_typedef7;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
typedef foo::function_wrapper<int > &&test_function_like_typedef8;
typedef int ;
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param aaa Meow.
typedef test_not_function_like_typedef1 test_not_function_like_typedef2;
// rdar://13066276
// Check that the diagnostic uses the same command marker as the comment.
// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
/// @param aaa Meow.
typedef unsigned int test_not_function_like_typedef3;
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param aaa Meow.
typedef foo::not_a_function_wrapper<1> test_not_function_like_typedef4;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using1 = int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using2 = int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using3 = int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using4 = int ;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using5 = foo::function_wrapper<int >;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using6 = foo::function_wrapper<int > *;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using7 = foo::function_wrapper<int > &;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
using test_function_like_using8 = foo::function_wrapper<int > &&;
// expected-warning@+4 {{template parameter 'U' not found in the template declaration}} expected-note@+4 {{did you mean 'T'?}}
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \tparam U Uuu.
using test_function_like_using9 = int;
// expected-warning@+4 {{template parameter 'U' not found in the template declaration}} expected-note@+4 {{did you mean 'T'?}}
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \tparam U Uuu.
using test_function_like_using10 = int ;
// expected-warning@+4 {{template parameter 'U' not found in the template declaration}} expected-note@+4 {{did you mean 'T'?}}
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \tparam U Uuu.
using test_function_like_using11 = foo::function_wrapper<int >;
// expected-warning@+4 {{template parameter 'U' not found in the template declaration}} expected-note@+4 {{did you mean 'T'?}}
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \tparam U Uuu.
using test_function_like_using12 = foo::function_wrapper<int > *;
using test_not_function_like_using1 = int ;
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param aaa Meow.
using test_not_function_like_using2 = test_not_function_like_using1;
// Check that the diagnostic uses the same command marker as the comment.
// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
/// @param aaa Meow.
using test_not_function_like_using3 = unsigned int;
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param aaa Meow.
using test_not_function_like_using4 = foo::not_a_function_wrapper<1>;
/// \param aaa Aaa
/// \param ... Vararg
int ;
/// \param ... Vararg
int ;
// expected-warning@+1 {{parameter '...' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
/// \param ... Vararg
int ;
// expected-warning@+1 {{parameter '...' not found in the function declaration}}
/// \param ... Vararg
int ;
/// \param aaa Aaa
/// \param ... Vararg
int ;
/// \param ... Vararg
int ;
// expected-warning@+1 {{parameter '...' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
/// \param ... Vararg
int ;
// expected-warning@+1 {{parameter '...' not found in the function declaration}}
/// \param ... Vararg
int ;
// expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
/// \tparam T Aaa
int test_tparam1;
// expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
/// \tparam T Aaa
void ;
// expected-warning@+1 {{empty paragraph passed to '\tparam' command}}
/// \tparam
/// \param aaa Blah blah
void ;
// expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
/// \tparam T Aaa
void ;
// expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
/// \tparam T Aaa
;
/// \tparam T1 Aaa
/// \tparam T2 Bbb
void ;
// expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}}
/// \tparam SomTy Aaa
/// \tparam OtherTy Bbb
void ;
// expected-warning@+2 {{template parameter 'T1' is already documented}} expected-note@+1 {{previous documentation}}
/// \tparam T1 Aaa
/// \tparam T1 Bbb
void ;
/// \tparam T Aaa
/// \tparam TT Bbb
void ;
/// \tparam T Aaa
/// \tparam TT Bbb
/// \tparam TTT Ccc
void ;
/// \tparam I Aaa
void ;
;
/// \tparam T Aaa
using test_tparam14 = test_tparam13<T, int>;
// expected-warning@+1 {{template parameter 'U' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}}
/// \tparam U Aaa
using test_tparam15 = test_tparam13<T, int>;
// ----
/// \tparam T Aaa
;
typedef test_tparam16<int> test_tparam17;
typedef test_tparam16<double> test_tparam18;
// ----
;
typedef test_tparam19<int> test_tparam20;
typedef test_tparam19<double> test_tparam21;
/// \tparam T Aaa
;
// ----
// expected-warning@+1 {{'@tparam' command used in a comment that is not attached to a template declaration}}
/// @tparam T Aaa
int test_tparam22;
// ----
/// Aaa
/// \deprecated Bbb
void ;
/// Aaa
/// \deprecated Bbb
void ;
// We don't want \deprecated to warn about empty paragraph. It is fine to use
// \deprecated by itself without explanations.
/// Aaa
/// \deprecated
void ;
/// Aaa
/// \deprecated
void ;
/// Aaa
/// \deprecated
void ;
// expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}}
/// Aaa
/// \deprecated
void ;
// expected-warning@+2 {{declaration is marked with '@deprecated' command but does not have a deprecation attribute}} expected-note@+3 {{add a deprecation attribute to the declaration to silence this warning}}
/// Aaa
/// @deprecated
void
// expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}}
/// Aaa
/// \deprecated
void ;
;
// rdar://12397511
// expected-note@+2 {{previous command '\headerfile' here}}
// expected-warning@+2 {{duplicated command '\headerfile'}}
/// \headerfile ""
/// \headerfile foo.h
int ;
/// \invariant aaa
void ;
// expected-warning@+1 {{empty paragraph passed to '\invariant' command}}
/// \invariant
void ;
// no-warning
/// \returns Aaa
int ;
;
// no-warning
/// \returns Aaa
int ;
// no-warning
/// \returns Aaa
int ;
/// \returns Aaa
T ;
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
int test_returns_wrong_decl_1_backslash;
// rdar://13066276
// Check that the diagnostic uses the same command marker as the comment.
// expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
/// @returns Aaa
int test_returns_wrong_decl_1_at;
// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
/// \return Aaa
int test_returns_wrong_decl_2;
// expected-warning@+1 {{'\result' command used in a comment that is not attached to a function or method declaration}}
/// \result Aaa
int test_returns_wrong_decl_3;
// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
void ;
// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
void ;
// expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
/// \returns Aaa
void ;
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
;
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
;
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
;
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
;
// rdar://13094352
// expected-warning@+1 {{'@function' command should be used in a comment attached to a function declaration}}
/*! @function test_function
*/
typedef unsigned int Base64Flags;
unsigned ;
// expected-warning@+1 {{'@callback' command should be used in a comment attached to a pointer to function declaration}}
/*! @callback test_callback
*/
typedef unsigned int BaseFlags;
unsigned ;
// expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}}
/// \endverbatim
int ;
// expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}}
/// \endcode
int ;
// FIXME: we give a bad diagnostic here because we throw away non-documentation
// comments early.
//
// expected-warning@+3 {{'\endcode' command does not terminate a verbatim text block}}
/// \code
// foo
/// \endcode
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
int test1; ///< \brief\author Aaa
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
int test2, ///< \brief\author Aaa
test3; ///< \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
int test4; ///< \brief
///< \author Aaa
;
/// \relates TestRelates
/// \brief Aaa
void ;
/// \related TestRelates
/// \brief Aaa
void ;
/// \relatesalso TestRelates
/// \brief Aaa
void ;
/// \relatedalso TestRelates
/// \brief Aaa
void ;
// Check that we attach the comment to the declaration during parsing in the
// following cases. The test is based on the fact that we don't parse
// documentation comments that are not attached to anything.
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
int test_attach1;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
int ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
struct test_noattach12 *test_attach13;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
typedef struct test_noattach14 *test_attach15;
// expected-warning@+1 + {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
typedef struct test_attach16 test_attach17;
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
typedef struct S *test_attach19;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 + {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
typedef struct test_attach21 test_attach23;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
void ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
void ;
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
// expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
/// \brief\author Aaa
/// \tparam T Aaa
void ;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
using test_attach29 = test_attach28<int>;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
using test_attach31 = test_attach30<T, int>;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
// expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
/// \brief\author Aaa
/// \tparam T Aaa
;
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
;
;
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
// expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
/// \brief\author Aaa
/// \tparam T Aaa
void
;
// expected-warning@+2 {{empty paragraph passed to '\brief' command}}
// expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
/// \brief\author Aaa
/// \tparam T Aaa
void
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\author Aaa
/// \tparam T Aaa
void
// We used to emit warning that parameter 'a' is not found because we parsed
// the comment in context of the redeclaration which does not have parameter
// names.
;
void ;
// The inline comments expect a string after the command.
// expected-warning@+1 {{'\a' command has no word arguments, expected 1}}
/// \a
int ;
/// \a A
int ;
// expected-warning@+1 {{'\anchor' command has no word arguments, expected 1}}
/// \anchor
int ;
/// \anchor A
int ;
// expected-warning@+1 {{'@b' command has no word arguments, expected 1}}
/// @b
int ;
/// @b A
int ;
// expected-warning@+1 {{'\c' command has no word arguments, expected 1}}
/// \c
int ;
/// \c A
int ;
// expected-warning@+1 {{'\e' command has no word arguments, expected 1}}
/// \e
int ;
/// \e A
int ;
// expected-warning@+1 {{'\em' command has no word arguments, expected 1}}
/// \em
int ;
/// \em A
int ;
// expected-warning@+1 {{'\p' command has no word arguments, expected 1}}
/// \p
int ;
/// \p A
int ;
// PR13411, reduced. We used to crash on this.
/**
* @code Aaa.
*/
void ;
// We used to crash on this.
// expected-warning@+2 {{empty paragraph passed to '\param' command}}
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \param\brief
void ;
// PR13593, example 1 and 2
/**
* Bla.
*/
void ;
/// Foo
void
void
// PR13593, example 3
/**
* aaa
*/
inline T
///
//,
inline void
// We used to crash on this.
/*!
Blah.
*/
typedef const struct test_nocrash7 * test_nocrash8;
// We used to crash on this.
// expected-warning@+1 {{unknown command tag name}}
/// aaa \unknown aaa \unknown aaa
int test_nocrash9;
// We used to crash on this. PR15068
// expected-warning@+2 {{empty paragraph passed to '@param' command}}
// expected-warning@+2 {{empty paragraph passed to '@param' command}}
///@param x
///@param y
int ;
// expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}}
// expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}}
///@param x
///@param y
int ;
// expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}}
// expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}}
/**
@param x
@param y
**/
int ;
// expected-warning@+2 {{empty paragraph passed to '@param' command}}
// expected-warning@+1 {{empty paragraph passed to '@param' command}}
///@param x@param y
int ;
/**
* \verbatim
* Aaa
**/
int ;
// rdar://12379114
// expected-warning@+2 {{'@union' command should not be used in a comment attached to a non-union declaration}}
/*!
@union U This is new
*/
;
/*!
@union U1
*/
;
// expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
/*!
@struct S2
*/
;
/*!
@class C1
*/
;
/*!
@struct S3;
*/
;
// rdar://14124702
//----------------------------------------------------------------------
/// @class Predicate Predicate.h "lldb/Host/Predicate.h"
/// @brief A C++ wrapper class for providing threaded access to a value
/// of type T.
///
/// A templatized class.
/// specified values.
//----------------------------------------------------------------------
;
//----------------------------------------------------------------------
/// @class Predicate<int, char> Predicate.h "lldb/Host/Predicate.h"
/// @brief A C++ wrapper class for providing threaded access to a value
/// of type T.
///
/// A template specialization class.
//----------------------------------------------------------------------
;
//----------------------------------------------------------------------
/// @class Predicate<T, int> Predicate.h "lldb/Host/Predicate.h"
/// @brief A C++ wrapper class for providing threaded access to a value
/// of type T.
///
/// A partial specialization template class.
//----------------------------------------------------------------------
;
/*! @function test_function
*/
T ;
/*! @function test_function<int>
*/
int ;
/*!
* Function pointer typedef with variadic params.
*
* @param a
* works
*
* @param ...
* now should work too.
*/
typedef void ;
/*!
* Function pointer type alias with variadic params.
*
* @param a
* works
*
* @param ...
* now should work too.
*/
using VariadicFnType2 = void ;
/*!
* Function pointer type variable.
*
* @param a
* works
*
* @param ...
* now should work too.
*/
void ;
// expected-warning@+2 {{empty paragraph passed to '@note' command}}
/**
@note
\f$\texttt{mu}_{00}=\texttt{m}_{00}\f$, \f$\texttt{nu}_{00}=1\f$
\f$\texttt{nu}_{10}=\texttt{mu}_{10}=\texttt{mu}_{01}=\texttt{mu}_{10}=0\f$
*/
;
// namespace PR42844