1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s
3 // This file contains lots of corner cases, so ensure that XML we generate is not invalid.
4 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s | FileCheck %s -check-prefix=WRONG
5 // WRONG-NOT: CommentXMLInvalid
7 // expected-warning@+1 {{expected quoted string after equals sign}}
11 // expected-warning@+1 {{expected quoted string after equals sign}}
15 // expected-warning@+2 {{expected quoted string after equals sign}}
16 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
20 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
24 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
28 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
32 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
36 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
40 // expected-warning@+2 {{HTML start tag prematurely ended, expected attribute name or '>'}} expected-note@+1 {{HTML tag started here}}
41 /** Aaa bbb<img ddd eee
46 // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
47 /** Aaa bbb<img ddd eee 42%
52 // expected-warning@+1 {{HTML end tag 'br' is forbidden}}
56 /// <blockquote>Meow</blockquote>
57 int test_html_nesting1(int);
59 /// <b><i>Meow</i></b>
60 int test_html_nesting2(int);
64 int test_html_nesting3(int);
68 int test_html_nesting4(int);
70 // expected-warning@+1 {{HTML end tag does not match any start tag}}
72 int test_html_nesting5(int);
74 // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
75 // expected-warning@+1 {{HTML end tag does not match any start tag}}
76 /// <b><i>Meow</b></b>
77 int test_html_nesting6(int);
79 // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
80 // expected-warning@+1 {{HTML end tag does not match any start tag}}
81 /// <b><i>Meow</b></i>
82 int test_html_nesting7(int);
85 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
86 /// \brief\returns Aaa
87 int test_block_command1(int);
89 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
90 /// \brief \returns Aaa
91 int test_block_command2(int);
93 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
96 int test_block_command3(int);
98 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
102 int test_block_command4(int);
104 // There is trailing whitespace on one of the following lines, don't remove it!
105 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
109 int test_block_command5(int);
112 int test_block_command6(int);
114 // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\brief' here}}
120 int test_duplicate_brief1(int);
122 // expected-warning@+5 {{duplicated command '\short'}} expected-note@+1 {{previous command '\short' here}}
128 int test_duplicate_brief2(int);
130 // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\short' (an alias of '\brief') here}}
136 int test_duplicate_brief3(int);
139 // expected-warning@+5 {{duplicated command '\return'}} expected-note@+1 {{previous command '\return' here}}
145 int test_duplicate_returns1(int);
147 // expected-warning@+5 {{duplicated command '\returns'}} expected-note@+1 {{previous command '\returns' here}}
153 int test_duplicate_returns2(int);
155 // expected-warning@+5 {{duplicated command '\result'}} expected-note@+1 {{previous command '\result' here}}
161 int test_duplicate_returns3(int);
163 // expected-warning@+5 {{duplicated command '\return'}} expected-note@+1 {{previous command '\returns' (an alias of '\return') here}}
169 int test_duplicate_returns4(int);
172 // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
173 /// \param a Blah blah.
176 // expected-warning@+1 {{empty paragraph passed to '\param' command}}
178 /// \param a Blah blah.
179 int test_param2(int a);
181 // expected-warning@+1 {{empty paragraph passed to '\param' command}}
183 int test_param3(int a);
185 /// \param a Blah blah.
186 int test_param4(int a);
188 /// \param [in] a Blah blah.
189 int test_param5(int a);
191 /// \param [out] a Blah blah.
192 int test_param6(int a);
194 /// \param [in,out] a Blah blah.
195 int test_param7(int a);
197 // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
198 /// \param [ in ] a Blah blah.
199 int test_param8(int a);
201 // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
202 /// \param [in, out] a Blah blah.
203 int test_param9(int a);
205 // expected-warning@+1 {{unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'}}
206 /// \param [ junk] a Blah blah.
207 int test_param10(int a);
209 // expected-warning@+1 {{parameter 'a' not found in the function declaration}}
210 /// \param a Blah blah.
213 // expected-warning@+1 {{parameter 'A' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}}
214 /// \param A Blah blah.
215 int test_param12(int a);
217 // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
218 /// \param aab Blah blah.
219 int test_param13(int aaa, int bbb);
221 // expected-warning@+2 {{parameter 'aab' not found in the function declaration}} expected-note@+2 {{did you mean 'bbb'?}}
222 /// \param aaa Blah blah.
223 /// \param aab Blah blah.
224 int test_param14(int aaa, int bbb);
226 // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
227 /// \param aab Blah blah.
228 int test_param15(int bbb, int ccc);
230 // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
234 int test_param16(int aaa, int bbb);
236 // expected-warning@+2 {{parameter 'aab' not found in the function declaration}}
240 int test_param17(int aaa, int bbb);
242 // expected-warning@+3 {{parameter 'aab' not found in the function declaration}}
246 int test_param18(int aaa, int bbb);
249 // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}}
250 /// \param aaa Blah blah.
253 // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}}
254 /// \param aaa Blah blah.
255 int test_param19(int bbb, int ccc);
258 // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
259 /// \param aab Blah blah.
261 void test_param20(int bbb, int ccc);
263 // expected-warning@+3 {{parameter 'a' is already documented}}
264 // expected-note@+1 {{previous documentation}}
267 int test_param21(int a);
269 // expected-warning@+4 {{parameter 'x2' is already documented}}
270 // expected-note@+2 {{previous documentation}}
274 int test_param22(int x1, int x2, int x3);
276 // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
280 typedef int test_param23(int aaa, int ccc);
282 // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
286 typedef int (*test_param24)(int aaa, int ccc);
288 // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
292 typedef int (* const test_param25)(int aaa, int ccc);
294 // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
298 typedef int (C::*test_param26)(int aaa, int ccc);
300 typedef int (*test_param27)(int aaa);
302 // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
304 typedef test_param27 test_param28;
307 // expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
309 typedef unsigned int test_param29;
312 // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
316 // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
318 void test_tparam2(int aaa);
320 // expected-warning@+1 {{empty paragraph passed to '\tparam' command}}
322 /// \param aaa Blah blah
324 void test_tparam3(T aaa);
326 // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
328 template<typename TT>
329 void test_tparam4(TT aaa);
331 // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
333 template<typename TT>
335 // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TTT'?}}
337 template<typename TTT>
338 void test_tparam6(TTT aaa);
343 template<typename T1, typename T2>
344 void test_tparam7(T1 aaa, T2 bbb);
346 // expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}}
347 /// \tparam SomTy Aaa
348 /// \tparam OtherTy Bbb
349 template<typename SomeTy, typename OtherTy>
350 void test_tparam8(SomeTy aaa, OtherTy bbb);
352 // expected-warning@+2 {{template parameter 'T1' is already documented}} expected-note@+1 {{previous documentation}}
355 template<typename T1, typename T2>
356 void test_tparam9(T1 aaa, T2 bbb);
360 template<template<typename T> class TT>
361 void test_tparam10(TT<int> aaa);
366 template<template<template<typename T> class TT, class C> class TTT>
367 void test_tparam11();
371 void test_tparam12();
373 template<typename T, typename U>
374 class test_tparam13 { };
378 using test_tparam14 = test_tparam13<T, int>;
380 // expected-warning@+1 {{template parameter 'U' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}}
383 using test_tparam15 = test_tparam13<T, int>;
389 class test_tparam16 { };
391 typedef test_tparam16<int> test_tparam17;
392 typedef test_tparam16<double> test_tparam18;
399 typedef test_tparam19<int> test_tparam20;
400 typedef test_tparam19<double> test_tparam21;
404 class test_tparam19 { };
408 // expected-warning@+1 {{'@tparam' command used in a comment that is not attached to a template declaration}}
417 void test_deprecated_1(int a) __attribute__((deprecated));
419 // We don't want \deprecated to warn about empty paragraph. It is fine to use
420 // \deprecated by itself without explanations.
424 void test_deprecated_2(int a) __attribute__((deprecated));
428 void test_deprecated_3(int a) __attribute__((availability(macosx,introduced=10.4)));
432 void test_deprecated_4(int a) __attribute__((unavailable));
434 // 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}}
437 void test_deprecated_5(int a);
439 // 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}}
442 void test_deprecated_6(int a) {
445 // expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}}
449 void test_deprecated_7(T aaa);
453 // expected-note@+2 {{previous command '\headerfile' here}}
454 // expected-warning@+2 {{duplicated command '\headerfile'}}
456 /// \headerfile foo.h
457 int test__headerfile_1(int a);
461 void test_invariant_1(int a);
463 // expected-warning@+1 {{empty paragraph passed to '\invariant' command}}
465 void test_invariant_2(int a);
470 int test_returns_right_decl_1(int);
472 class test_returns_right_decl_2 {
475 int test_returns_right_decl_3(int);
481 int test_returns_right_decl_4(T aaa);
486 int test_returns_right_decl_4(int aaa);
490 T test_returns_right_decl_5(T aaa);
492 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
494 int test_returns_wrong_decl_1;
496 // expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
498 int test_returns_wrong_decl_2;
500 // expected-warning@+1 {{'\result' command used in a comment that is not attached to a function or method declaration}}
502 int test_returns_wrong_decl_3;
504 // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
506 void test_returns_wrong_decl_4(int);
508 // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
511 void test_returns_wrong_decl_5(T aaa);
513 // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
516 void test_returns_wrong_decl_5(int aaa);
518 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
520 struct test_returns_wrong_decl_6 { };
522 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
524 class test_returns_wrong_decl_7 {
525 // expected-warning@+1 {{'\returns' command used in a comment that is attached to a constructor}}
527 test_returns_wrong_decl_7();
529 // expected-warning@+1 {{'\returns' command used in a comment that is attached to a destructor}}
531 ~test_returns_wrong_decl_7();
534 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
536 enum test_returns_wrong_decl_8 {
537 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
539 test_returns_wrong_decl_9
542 // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
544 namespace test_returns_wrong_decl_10 { };
547 // expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
549 typedef unsigned int test_returns_wrong_decl_11;
552 // expected-warning@+1 {{'@function' command should be used in a comment attached to a function declaration}}
553 /*! @function test_function
555 typedef unsigned int Base64Flags;
556 unsigned test_function(Base64Flags inFlags);
558 // expected-warning@+1 {{'@callback' command should be used in a comment attached to a pointer to function declaration}}
559 /*! @callback test_callback
561 typedef unsigned int BaseFlags;
562 unsigned (*test_callback)(BaseFlags inFlags);
564 // expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}}
566 int test_verbatim_1();
568 // expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}}
570 int test_verbatim_2();
572 // FIXME: we give a bad diagnostic here because we throw away non-documentation
575 // expected-warning@+3 {{'\endcode' command does not terminate a verbatim text block}}
579 int test_verbatim_3();
582 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
583 int test1; ///< \brief\author Aaa
585 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
586 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
587 int test2, ///< \brief\author Aaa
588 test3; ///< \brief\author Aaa
590 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
591 int test4; ///< \brief
595 // Check that we attach the comment to the declaration during parsing in the
596 // following cases. The test is based on the fact that we don't parse
597 // documentation comments that are not attached to anything.
599 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
600 /// \brief\author Aaa
603 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
604 /// \brief\author Aaa
605 int test_attach2(int);
607 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
608 /// \brief\author Aaa
609 struct test_attach3 {
610 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
611 /// \brief\author Aaa
614 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
615 int test_attach5; ///< \brief\author Aaa
617 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
618 /// \brief\author Aaa
619 int test_attach6(int);
622 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
623 /// \brief\author Aaa
625 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
626 /// \brief\author Aaa
629 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
630 int test_attach9; ///< \brief\author Aaa
632 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
633 /// \brief\author Aaa
634 int test_attach10(int);
637 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
638 /// \brief\author Aaa
640 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
641 /// \brief\author Aaa
644 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
645 test_attach11 ///< \brief\author Aaa
648 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
649 /// \brief\author Aaa
650 struct test_noattach12 *test_attach13;
652 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
653 /// \brief\author Aaa
654 typedef struct test_noattach14 *test_attach15;
656 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
657 /// \brief\author Aaa
658 typedef struct test_attach16 { int a; } test_attach17;
662 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
663 /// \brief\author Aaa
664 struct S *test_attach18;
666 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
667 /// \brief\author Aaa
668 typedef struct S *test_attach19;
670 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
671 /// \brief\author Aaa
672 struct test_attach20;
674 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
675 /// \brief\author Aaa
676 typedef struct test_attach21 {
677 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
678 /// \brief\author Aaa
682 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
683 /// \brief\author Aaa
684 namespace test_attach24 {
685 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
686 /// \brief\author Aaa
687 namespace test_attach25 {
691 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
692 /// \brief\author Aaa
695 void test_attach26(T aaa);
697 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
698 /// \brief\author Aaa
700 template<typename T, typename U>
701 void test_attach27(T aaa, U bbb);
703 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
704 // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
705 /// \brief\author Aaa
708 void test_attach27(int aaa, int bbb);
710 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
711 /// \brief\author Aaa
714 class test_attach28 {
718 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
719 /// \brief\author Aaa
720 using test_attach29 = test_attach28<int>;
722 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
723 /// \brief\author Aaa
725 template<typename T, typename U>
726 class test_attach30 { };
728 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
729 /// \brief\author Aaa
732 class test_attach30<T, int> { };
734 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
735 /// \brief\author Aaa
737 class test_attach30<int, int> { };
739 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
740 /// \brief\author Aaa
742 using test_attach31 = test_attach30<T, int>;
744 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
745 /// \brief\author Aaa
747 template<typename T, typename U, typename V>
748 class test_attach32 { };
750 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
751 /// \brief\author Aaa
753 template<typename T, typename U>
754 class test_attach32<T, U, int> { };
756 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
757 /// \brief\author Aaa
760 class test_attach32<T, int, int> { };
762 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
763 // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
764 /// \brief\author Aaa
767 class test_attach32<int, int, int> { };
769 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
770 /// \brief\author Aaa
771 class test_attach33 {
772 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
773 /// \brief\author Aaa
775 template<typename T, typename U>
776 void test_attach34(T aaa, U bbb);
780 class test_attach35 {
781 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
782 // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
783 /// \brief\author Aaa
785 template<typename TT, typename UU>
786 void test_attach36(TT aaa, UU bbb);
789 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
790 // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
791 /// \brief\author Aaa
793 template<> template<>
794 void test_attach35<int>::test_attach36(int aaa, int bbb) {}
797 class test_attach37 {
798 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
799 // expected-warning@+2 {{'\tparam' command used in a comment that is not attached to a template declaration}}
800 /// \brief\author Aaa
802 void test_attach38(int aaa, int bbb);
804 void test_attach39(int aaa, int bbb);
807 // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
808 // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
809 /// \brief\author Aaa
812 void test_attach37<int>::test_attach38(int aaa, int bbb) {}
814 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
815 /// \brief\author Aaa
818 void test_attach37<T>::test_attach39(int aaa, int bbb) {}
820 // We used to emit warning that parameter 'a' is not found because we parsed
821 // the comment in context of the redeclaration which does not have parameter
823 template <typename T>
824 struct test_attach38 {
827 \param b Second param
829 template <typename B>
830 void test_attach39(T a, B b);
834 template <typename B>
835 void test_attach38<int>::test_attach39(int, B);
838 // PR13411, reduced. We used to crash on this.
842 void test_nocrash1(int);
844 // We used to crash on this.
845 // expected-warning@+2 {{empty paragraph passed to '\param' command}}
846 // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
848 void test_nocrash2(int);
850 // PR13593, example 1 and 2
856 void test_nocrash3();
859 template <typename, typename>
860 void test_nocrash4() { }
867 // PR13593, example 3
872 template <typename T>
873 inline T test_nocrash5(T a1)
881 inline void test_nocrash6()
886 // We used to crash on this.
891 typedef const struct test_nocrash7 * test_nocrash8;
893 // We used to crash on this.
895 // expected-warning@+1 {{unknown command tag name}}
896 /// aaa \unknown aaa \unknown aaa
899 // We used to crash on this. PR15068
901 // expected-warning@+2 {{empty paragraph passed to '@param' command}}
902 // expected-warning@+2 {{empty paragraph passed to '@param' command}}
905 int test_nocrash10(int x, int y);
907 // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}}
908 // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}}
911 int test_nocrash11();
913 // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}}
914 // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}}
919 int test_nocrash12();
921 // expected-warning@+2 {{empty paragraph passed to '@param' command}}
922 // expected-warning@+1 {{empty paragraph passed to '@param' command}}
924 int test_nocrash13(int x, int y);
927 // expected-warning@+2 {{'@union' command should not be used in a comment attached to a non-union declaration}}
931 struct U { int iS; };
938 // expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}