xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/warn-documentation.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wdocumentation -Wdocumentation-pedantic -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // This file contains lots of corner cases, so ensure that XML we generate is not invalid.
4*f4a2713aSLionel Sambuc // 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*f4a2713aSLionel Sambuc // WRONG-NOT: CommentXMLInvalid
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc // expected-warning@+1 {{expected quoted string after equals sign}}
8*f4a2713aSLionel Sambuc /// <a href=>
9*f4a2713aSLionel Sambuc int test_html1(int);
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc // expected-warning@+1 {{expected quoted string after equals sign}}
12*f4a2713aSLionel Sambuc /// <a href==>
13*f4a2713aSLionel Sambuc int test_html2(int);
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc // expected-warning@+2 {{expected quoted string after equals sign}}
16*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
17*f4a2713aSLionel Sambuc /// <a href= blah
18*f4a2713aSLionel Sambuc int test_html3(int);
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
21*f4a2713aSLionel Sambuc /// <a =>
22*f4a2713aSLionel Sambuc int test_html4(int);
23*f4a2713aSLionel Sambuc 
24*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
25*f4a2713aSLionel Sambuc /// <a "aaa">
26*f4a2713aSLionel Sambuc int test_html5(int);
27*f4a2713aSLionel Sambuc 
28*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
29*f4a2713aSLionel Sambuc /// <a a="b" =>
30*f4a2713aSLionel Sambuc int test_html6(int);
31*f4a2713aSLionel Sambuc 
32*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
33*f4a2713aSLionel Sambuc /// <a a="b" "aaa">
34*f4a2713aSLionel Sambuc int test_html7(int);
35*f4a2713aSLionel Sambuc 
36*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
37*f4a2713aSLionel Sambuc /// <a a="b" =
38*f4a2713aSLionel Sambuc int test_html8(int);
39*f4a2713aSLionel Sambuc 
40*f4a2713aSLionel Sambuc // expected-warning@+2 {{HTML start tag prematurely ended, expected attribute name or '>'}} expected-note@+1 {{HTML tag started here}}
41*f4a2713aSLionel Sambuc /** Aaa bbb<img ddd eee
42*f4a2713aSLionel Sambuc  * fff ggg.
43*f4a2713aSLionel Sambuc  */
44*f4a2713aSLionel Sambuc int test_html9(int);
45*f4a2713aSLionel Sambuc 
46*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
47*f4a2713aSLionel Sambuc /** Aaa bbb<img ddd eee 42%
48*f4a2713aSLionel Sambuc  * fff ggg.
49*f4a2713aSLionel Sambuc  */
50*f4a2713aSLionel Sambuc int test_html10(int);
51*f4a2713aSLionel Sambuc 
52*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML end tag 'br' is forbidden}}
53*f4a2713aSLionel Sambuc /// <br></br>
54*f4a2713aSLionel Sambuc int test_html11(int);
55*f4a2713aSLionel Sambuc 
56*f4a2713aSLionel Sambuc /// <blockquote>Meow</blockquote>
57*f4a2713aSLionel Sambuc int test_html_nesting1(int);
58*f4a2713aSLionel Sambuc 
59*f4a2713aSLionel Sambuc /// <b><i>Meow</i></b>
60*f4a2713aSLionel Sambuc int test_html_nesting2(int);
61*f4a2713aSLionel Sambuc 
62*f4a2713aSLionel Sambuc /// <p>Aaa<br>
63*f4a2713aSLionel Sambuc /// Bbb</p>
64*f4a2713aSLionel Sambuc int test_html_nesting3(int);
65*f4a2713aSLionel Sambuc 
66*f4a2713aSLionel Sambuc /// <p>Aaa<br />
67*f4a2713aSLionel Sambuc /// Bbb</p>
68*f4a2713aSLionel Sambuc int test_html_nesting4(int);
69*f4a2713aSLionel Sambuc 
70*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML end tag does not match any start tag}}
71*f4a2713aSLionel Sambuc /// <b><i>Meow</a>
72*f4a2713aSLionel Sambuc int test_html_nesting5(int);
73*f4a2713aSLionel Sambuc 
74*f4a2713aSLionel Sambuc // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
75*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML end tag does not match any start tag}}
76*f4a2713aSLionel Sambuc /// <b><i>Meow</b></b>
77*f4a2713aSLionel Sambuc int test_html_nesting6(int);
78*f4a2713aSLionel Sambuc 
79*f4a2713aSLionel Sambuc // expected-warning@+2 {{HTML start tag 'i' closed by 'b'}}
80*f4a2713aSLionel Sambuc // expected-warning@+1 {{HTML end tag does not match any start tag}}
81*f4a2713aSLionel Sambuc /// <b><i>Meow</b></i>
82*f4a2713aSLionel Sambuc int test_html_nesting7(int);
83*f4a2713aSLionel Sambuc 
84*f4a2713aSLionel Sambuc 
85*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
86*f4a2713aSLionel Sambuc /// \brief\returns Aaa
87*f4a2713aSLionel Sambuc int test_block_command1(int);
88*f4a2713aSLionel Sambuc 
89*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
90*f4a2713aSLionel Sambuc /// \brief \returns Aaa
91*f4a2713aSLionel Sambuc int test_block_command2(int);
92*f4a2713aSLionel Sambuc 
93*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
94*f4a2713aSLionel Sambuc /// \brief
95*f4a2713aSLionel Sambuc /// \returns Aaa
96*f4a2713aSLionel Sambuc int test_block_command3(int);
97*f4a2713aSLionel Sambuc 
98*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
99*f4a2713aSLionel Sambuc /// \brief
100*f4a2713aSLionel Sambuc ///
101*f4a2713aSLionel Sambuc /// \returns Aaa
102*f4a2713aSLionel Sambuc int test_block_command4(int);
103*f4a2713aSLionel Sambuc 
104*f4a2713aSLionel Sambuc // There is trailing whitespace on one of the following lines, don't remove it!
105*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
106*f4a2713aSLionel Sambuc /// \brief
107*f4a2713aSLionel Sambuc ///
108*f4a2713aSLionel Sambuc /// \returns Aaa
109*f4a2713aSLionel Sambuc int test_block_command5(int);
110*f4a2713aSLionel Sambuc 
111*f4a2713aSLionel Sambuc /// \brief \c Aaa
112*f4a2713aSLionel Sambuc int test_block_command6(int);
113*f4a2713aSLionel Sambuc 
114*f4a2713aSLionel Sambuc // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\brief' here}}
115*f4a2713aSLionel Sambuc /// \brief Aaa
116*f4a2713aSLionel Sambuc ///
117*f4a2713aSLionel Sambuc /// Bbb
118*f4a2713aSLionel Sambuc ///
119*f4a2713aSLionel Sambuc /// \brief Ccc
120*f4a2713aSLionel Sambuc int test_duplicate_brief1(int);
121*f4a2713aSLionel Sambuc 
122*f4a2713aSLionel Sambuc // expected-warning@+5 {{duplicated command '\short'}} expected-note@+1 {{previous command '\short' here}}
123*f4a2713aSLionel Sambuc /// \short Aaa
124*f4a2713aSLionel Sambuc ///
125*f4a2713aSLionel Sambuc /// Bbb
126*f4a2713aSLionel Sambuc ///
127*f4a2713aSLionel Sambuc /// \short Ccc
128*f4a2713aSLionel Sambuc int test_duplicate_brief2(int);
129*f4a2713aSLionel Sambuc 
130*f4a2713aSLionel Sambuc // expected-warning@+5 {{duplicated command '\brief'}} expected-note@+1 {{previous command '\short' (an alias of '\brief') here}}
131*f4a2713aSLionel Sambuc /// \short Aaa
132*f4a2713aSLionel Sambuc ///
133*f4a2713aSLionel Sambuc /// Bbb
134*f4a2713aSLionel Sambuc ///
135*f4a2713aSLionel Sambuc /// \brief Ccc
136*f4a2713aSLionel Sambuc int test_duplicate_brief3(int);
137*f4a2713aSLionel Sambuc 
138*f4a2713aSLionel Sambuc 
139*f4a2713aSLionel Sambuc /// \return Aaa
140*f4a2713aSLionel Sambuc ///
141*f4a2713aSLionel Sambuc /// Bbb
142*f4a2713aSLionel Sambuc ///
143*f4a2713aSLionel Sambuc /// \return Ccc
144*f4a2713aSLionel Sambuc int test_multiple_returns1(int);
145*f4a2713aSLionel Sambuc 
146*f4a2713aSLionel Sambuc /// \returns Aaa
147*f4a2713aSLionel Sambuc ///
148*f4a2713aSLionel Sambuc /// Bbb
149*f4a2713aSLionel Sambuc ///
150*f4a2713aSLionel Sambuc /// \returns Ccc
151*f4a2713aSLionel Sambuc int test_multiple_returns2(int);
152*f4a2713aSLionel Sambuc 
153*f4a2713aSLionel Sambuc /// \result Aaa
154*f4a2713aSLionel Sambuc ///
155*f4a2713aSLionel Sambuc /// Bbb
156*f4a2713aSLionel Sambuc ///
157*f4a2713aSLionel Sambuc /// \result Ccc
158*f4a2713aSLionel Sambuc int test_multiple_returns3(int);
159*f4a2713aSLionel Sambuc 
160*f4a2713aSLionel Sambuc /// \returns Aaa
161*f4a2713aSLionel Sambuc ///
162*f4a2713aSLionel Sambuc /// Bbb
163*f4a2713aSLionel Sambuc ///
164*f4a2713aSLionel Sambuc /// \return Ccc
165*f4a2713aSLionel Sambuc int test_multiple_returns4(int);
166*f4a2713aSLionel Sambuc 
167*f4a2713aSLionel Sambuc 
168*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
169*f4a2713aSLionel Sambuc /// \param a Blah blah.
170*f4a2713aSLionel Sambuc int test_param1;
171*f4a2713aSLionel Sambuc 
172*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\param' command}}
173*f4a2713aSLionel Sambuc /// \param
174*f4a2713aSLionel Sambuc /// \param a Blah blah.
175*f4a2713aSLionel Sambuc int test_param2(int a);
176*f4a2713aSLionel Sambuc 
177*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\param' command}}
178*f4a2713aSLionel Sambuc /// \param a
179*f4a2713aSLionel Sambuc int test_param3(int a);
180*f4a2713aSLionel Sambuc 
181*f4a2713aSLionel Sambuc /// \param a Blah blah.
182*f4a2713aSLionel Sambuc int test_param4(int a);
183*f4a2713aSLionel Sambuc 
184*f4a2713aSLionel Sambuc /// \param [in] a Blah blah.
185*f4a2713aSLionel Sambuc int test_param5(int a);
186*f4a2713aSLionel Sambuc 
187*f4a2713aSLionel Sambuc /// \param [out] a Blah blah.
188*f4a2713aSLionel Sambuc int test_param6(int a);
189*f4a2713aSLionel Sambuc 
190*f4a2713aSLionel Sambuc /// \param [in,out] a Blah blah.
191*f4a2713aSLionel Sambuc int test_param7(int a);
192*f4a2713aSLionel Sambuc 
193*f4a2713aSLionel Sambuc // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
194*f4a2713aSLionel Sambuc /// \param [ in ] a Blah blah.
195*f4a2713aSLionel Sambuc int test_param8(int a);
196*f4a2713aSLionel Sambuc 
197*f4a2713aSLionel Sambuc // expected-warning@+1 {{whitespace is not allowed in parameter passing direction}}
198*f4a2713aSLionel Sambuc /// \param [in, out] a Blah blah.
199*f4a2713aSLionel Sambuc int test_param9(int a);
200*f4a2713aSLionel Sambuc 
201*f4a2713aSLionel Sambuc // expected-warning@+1 {{unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'}}
202*f4a2713aSLionel Sambuc /// \param [ junk] a Blah blah.
203*f4a2713aSLionel Sambuc int test_param10(int a);
204*f4a2713aSLionel Sambuc 
205*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'a' not found in the function declaration}}
206*f4a2713aSLionel Sambuc /// \param a Blah blah.
207*f4a2713aSLionel Sambuc int test_param11();
208*f4a2713aSLionel Sambuc 
209*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'A' not found in the function declaration}} expected-note@+1 {{did you mean 'a'?}}
210*f4a2713aSLionel Sambuc /// \param A Blah blah.
211*f4a2713aSLionel Sambuc int test_param12(int a);
212*f4a2713aSLionel Sambuc 
213*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'aab' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
214*f4a2713aSLionel Sambuc /// \param aab Blah blah.
215*f4a2713aSLionel Sambuc int test_param13(int aaa, int bbb);
216*f4a2713aSLionel Sambuc 
217*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'aab' not found in the function declaration}} expected-note@+2 {{did you mean 'bbb'?}}
218*f4a2713aSLionel Sambuc /// \param aaa Blah blah.
219*f4a2713aSLionel Sambuc /// \param aab Blah blah.
220*f4a2713aSLionel Sambuc int test_param14(int aaa, int bbb);
221*f4a2713aSLionel Sambuc 
222*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
223*f4a2713aSLionel Sambuc /// \param aab Blah blah.
224*f4a2713aSLionel Sambuc int test_param15(int bbb, int ccc);
225*f4a2713aSLionel Sambuc 
226*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
227*f4a2713aSLionel Sambuc /// \param aab Ccc.
228*f4a2713aSLionel Sambuc /// \param aaa Aaa.
229*f4a2713aSLionel Sambuc /// \param bbb Bbb.
230*f4a2713aSLionel Sambuc int test_param16(int aaa, int bbb);
231*f4a2713aSLionel Sambuc 
232*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'aab' not found in the function declaration}}
233*f4a2713aSLionel Sambuc /// \param aaa Aaa.
234*f4a2713aSLionel Sambuc /// \param aab Ccc.
235*f4a2713aSLionel Sambuc /// \param bbb Bbb.
236*f4a2713aSLionel Sambuc int test_param17(int aaa, int bbb);
237*f4a2713aSLionel Sambuc 
238*f4a2713aSLionel Sambuc // expected-warning@+3 {{parameter 'aab' not found in the function declaration}}
239*f4a2713aSLionel Sambuc /// \param aaa Aaa.
240*f4a2713aSLionel Sambuc /// \param bbb Bbb.
241*f4a2713aSLionel Sambuc /// \param aab Ccc.
242*f4a2713aSLionel Sambuc int test_param18(int aaa, int bbb);
243*f4a2713aSLionel Sambuc 
244*f4a2713aSLionel Sambuc class C {
245*f4a2713aSLionel Sambuc   // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}}
246*f4a2713aSLionel Sambuc   /// \param aaa Blah blah.
247*f4a2713aSLionel Sambuc   C(int bbb, int ccc);
248*f4a2713aSLionel Sambuc 
249*f4a2713aSLionel Sambuc   // expected-warning@+1 {{parameter 'aaa' not found in the function declaration}}
250*f4a2713aSLionel Sambuc   /// \param aaa Blah blah.
251*f4a2713aSLionel Sambuc  int test_param19(int bbb, int ccc);
252*f4a2713aSLionel Sambuc };
253*f4a2713aSLionel Sambuc 
254*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter 'aab' not found in the function declaration}}
255*f4a2713aSLionel Sambuc /// \param aab Blah blah.
256*f4a2713aSLionel Sambuc template<typename T>
257*f4a2713aSLionel Sambuc void test_param20(int bbb, int ccc);
258*f4a2713aSLionel Sambuc 
259*f4a2713aSLionel Sambuc // expected-warning@+3 {{parameter 'a' is already documented}}
260*f4a2713aSLionel Sambuc // expected-note@+1 {{previous documentation}}
261*f4a2713aSLionel Sambuc /// \param a Aaa.
262*f4a2713aSLionel Sambuc /// \param a Aaa.
263*f4a2713aSLionel Sambuc int test_param21(int a);
264*f4a2713aSLionel Sambuc 
265*f4a2713aSLionel Sambuc // expected-warning@+4 {{parameter 'x2' is already documented}}
266*f4a2713aSLionel Sambuc // expected-note@+2 {{previous documentation}}
267*f4a2713aSLionel Sambuc /// \param x1 Aaa.
268*f4a2713aSLionel Sambuc /// \param x2 Bbb.
269*f4a2713aSLionel Sambuc /// \param x2 Ccc.
270*f4a2713aSLionel Sambuc int test_param22(int x1, int x2, int x3);
271*f4a2713aSLionel Sambuc 
272*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
273*f4a2713aSLionel Sambuc /// \param aaa Meow.
274*f4a2713aSLionel Sambuc /// \param bbb Bbb.
275*f4a2713aSLionel Sambuc /// \returns aaa.
276*f4a2713aSLionel Sambuc typedef int test_param23(int aaa, int ccc);
277*f4a2713aSLionel Sambuc 
278*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
279*f4a2713aSLionel Sambuc /// \param aaa Meow.
280*f4a2713aSLionel Sambuc /// \param bbb Bbb.
281*f4a2713aSLionel Sambuc /// \returns aaa.
282*f4a2713aSLionel Sambuc typedef int (*test_param24)(int aaa, int ccc);
283*f4a2713aSLionel Sambuc 
284*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
285*f4a2713aSLionel Sambuc /// \param aaa Meow.
286*f4a2713aSLionel Sambuc /// \param bbb Bbb.
287*f4a2713aSLionel Sambuc /// \returns aaa.
288*f4a2713aSLionel Sambuc typedef int (* const test_param25)(int aaa, int ccc);
289*f4a2713aSLionel Sambuc 
290*f4a2713aSLionel Sambuc // expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
291*f4a2713aSLionel Sambuc /// \param aaa Meow.
292*f4a2713aSLionel Sambuc /// \param bbb Bbb.
293*f4a2713aSLionel Sambuc /// \returns aaa.
294*f4a2713aSLionel Sambuc typedef int (C::*test_param26)(int aaa, int ccc);
295*f4a2713aSLionel Sambuc 
296*f4a2713aSLionel Sambuc typedef int (*test_param27)(int aaa);
297*f4a2713aSLionel Sambuc 
298*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
299*f4a2713aSLionel Sambuc /// \param aaa Meow.
300*f4a2713aSLionel Sambuc typedef test_param27 test_param28;
301*f4a2713aSLionel Sambuc 
302*f4a2713aSLionel Sambuc // rdar://13066276
303*f4a2713aSLionel Sambuc // expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
304*f4a2713aSLionel Sambuc /// @param aaa Meow.
305*f4a2713aSLionel Sambuc typedef unsigned int test_param29;
306*f4a2713aSLionel Sambuc 
307*f4a2713aSLionel Sambuc 
308*f4a2713aSLionel Sambuc /// \param aaa Aaa
309*f4a2713aSLionel Sambuc /// \param ... Vararg
310*f4a2713aSLionel Sambuc int test_vararg_param1(int aaa, ...);
311*f4a2713aSLionel Sambuc 
312*f4a2713aSLionel Sambuc /// \param ... Vararg
313*f4a2713aSLionel Sambuc int test_vararg_param2(...);
314*f4a2713aSLionel Sambuc 
315*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter '...' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
316*f4a2713aSLionel Sambuc /// \param ... Vararg
317*f4a2713aSLionel Sambuc int test_vararg_param3(int aaa);
318*f4a2713aSLionel Sambuc 
319*f4a2713aSLionel Sambuc // expected-warning@+1 {{parameter '...' not found in the function declaration}}
320*f4a2713aSLionel Sambuc /// \param ... Vararg
321*f4a2713aSLionel Sambuc int test_vararg_param4();
322*f4a2713aSLionel Sambuc 
323*f4a2713aSLionel Sambuc 
324*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
325*f4a2713aSLionel Sambuc /// \tparam T Aaa
326*f4a2713aSLionel Sambuc int test_tparam1;
327*f4a2713aSLionel Sambuc 
328*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
329*f4a2713aSLionel Sambuc /// \tparam T Aaa
330*f4a2713aSLionel Sambuc void test_tparam2(int aaa);
331*f4a2713aSLionel Sambuc 
332*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\tparam' command}}
333*f4a2713aSLionel Sambuc /// \tparam
334*f4a2713aSLionel Sambuc /// \param aaa Blah blah
335*f4a2713aSLionel Sambuc template<typename T>
336*f4a2713aSLionel Sambuc void test_tparam3(T aaa);
337*f4a2713aSLionel Sambuc 
338*f4a2713aSLionel Sambuc // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
339*f4a2713aSLionel Sambuc /// \tparam T Aaa
340*f4a2713aSLionel Sambuc template<typename TT>
341*f4a2713aSLionel Sambuc void test_tparam4(TT aaa);
342*f4a2713aSLionel Sambuc 
343*f4a2713aSLionel Sambuc // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TT'?}}
344*f4a2713aSLionel Sambuc /// \tparam T Aaa
345*f4a2713aSLionel Sambuc template<typename TT>
346*f4a2713aSLionel Sambuc class test_tparam5 {
347*f4a2713aSLionel Sambuc   // expected-warning@+1 {{template parameter 'T' not found in the template declaration}} expected-note@+1 {{did you mean 'TTT'?}}
348*f4a2713aSLionel Sambuc   /// \tparam T Aaa
349*f4a2713aSLionel Sambuc   template<typename TTT>
350*f4a2713aSLionel Sambuc   void test_tparam6(TTT aaa);
351*f4a2713aSLionel Sambuc };
352*f4a2713aSLionel Sambuc 
353*f4a2713aSLionel Sambuc /// \tparam T1 Aaa
354*f4a2713aSLionel Sambuc /// \tparam T2 Bbb
355*f4a2713aSLionel Sambuc template<typename T1, typename T2>
356*f4a2713aSLionel Sambuc void test_tparam7(T1 aaa, T2 bbb);
357*f4a2713aSLionel Sambuc 
358*f4a2713aSLionel Sambuc // expected-warning@+1 {{template parameter 'SomTy' not found in the template declaration}} expected-note@+1 {{did you mean 'SomeTy'?}}
359*f4a2713aSLionel Sambuc /// \tparam SomTy Aaa
360*f4a2713aSLionel Sambuc /// \tparam OtherTy Bbb
361*f4a2713aSLionel Sambuc template<typename SomeTy, typename OtherTy>
362*f4a2713aSLionel Sambuc void test_tparam8(SomeTy aaa, OtherTy bbb);
363*f4a2713aSLionel Sambuc 
364*f4a2713aSLionel Sambuc // expected-warning@+2 {{template parameter 'T1' is already documented}} expected-note@+1 {{previous documentation}}
365*f4a2713aSLionel Sambuc /// \tparam T1 Aaa
366*f4a2713aSLionel Sambuc /// \tparam T1 Bbb
367*f4a2713aSLionel Sambuc template<typename T1, typename T2>
368*f4a2713aSLionel Sambuc void test_tparam9(T1 aaa, T2 bbb);
369*f4a2713aSLionel Sambuc 
370*f4a2713aSLionel Sambuc /// \tparam T Aaa
371*f4a2713aSLionel Sambuc /// \tparam TT Bbb
372*f4a2713aSLionel Sambuc template<template<typename T> class TT>
373*f4a2713aSLionel Sambuc void test_tparam10(TT<int> aaa);
374*f4a2713aSLionel Sambuc 
375*f4a2713aSLionel Sambuc /// \tparam T Aaa
376*f4a2713aSLionel Sambuc /// \tparam TT Bbb
377*f4a2713aSLionel Sambuc /// \tparam TTT Ccc
378*f4a2713aSLionel Sambuc template<template<template<typename T> class TT, class C> class TTT>
379*f4a2713aSLionel Sambuc void test_tparam11();
380*f4a2713aSLionel Sambuc 
381*f4a2713aSLionel Sambuc /// \tparam I Aaa
382*f4a2713aSLionel Sambuc template<int I>
383*f4a2713aSLionel Sambuc void test_tparam12();
384*f4a2713aSLionel Sambuc 
385*f4a2713aSLionel Sambuc template<typename T, typename U>
386*f4a2713aSLionel Sambuc class test_tparam13 { };
387*f4a2713aSLionel Sambuc 
388*f4a2713aSLionel Sambuc /// \tparam T Aaa
389*f4a2713aSLionel Sambuc template<typename T>
390*f4a2713aSLionel Sambuc using test_tparam14 = test_tparam13<T, int>;
391*f4a2713aSLionel Sambuc 
392*f4a2713aSLionel Sambuc // expected-warning@+1 {{template parameter 'U' not found in the template declaration}} expected-note@+1 {{did you mean 'T'?}}
393*f4a2713aSLionel Sambuc /// \tparam U Aaa
394*f4a2713aSLionel Sambuc template<typename T>
395*f4a2713aSLionel Sambuc using test_tparam15 = test_tparam13<T, int>;
396*f4a2713aSLionel Sambuc 
397*f4a2713aSLionel Sambuc // ----
398*f4a2713aSLionel Sambuc 
399*f4a2713aSLionel Sambuc /// \tparam T Aaa
400*f4a2713aSLionel Sambuc template<typename T>
401*f4a2713aSLionel Sambuc class test_tparam16 { };
402*f4a2713aSLionel Sambuc 
403*f4a2713aSLionel Sambuc typedef test_tparam16<int> test_tparam17;
404*f4a2713aSLionel Sambuc typedef test_tparam16<double> test_tparam18;
405*f4a2713aSLionel Sambuc 
406*f4a2713aSLionel Sambuc // ----
407*f4a2713aSLionel Sambuc 
408*f4a2713aSLionel Sambuc template<typename T>
409*f4a2713aSLionel Sambuc class test_tparam19;
410*f4a2713aSLionel Sambuc 
411*f4a2713aSLionel Sambuc typedef test_tparam19<int> test_tparam20;
412*f4a2713aSLionel Sambuc typedef test_tparam19<double> test_tparam21;
413*f4a2713aSLionel Sambuc 
414*f4a2713aSLionel Sambuc /// \tparam T Aaa
415*f4a2713aSLionel Sambuc template<typename T>
416*f4a2713aSLionel Sambuc class test_tparam19 { };
417*f4a2713aSLionel Sambuc 
418*f4a2713aSLionel Sambuc // ----
419*f4a2713aSLionel Sambuc 
420*f4a2713aSLionel Sambuc // expected-warning@+1 {{'@tparam' command used in a comment that is not attached to a template declaration}}
421*f4a2713aSLionel Sambuc /// @tparam T Aaa
422*f4a2713aSLionel Sambuc int test_tparam22;
423*f4a2713aSLionel Sambuc 
424*f4a2713aSLionel Sambuc // ----
425*f4a2713aSLionel Sambuc 
426*f4a2713aSLionel Sambuc 
427*f4a2713aSLionel Sambuc /// Aaa
428*f4a2713aSLionel Sambuc /// \deprecated Bbb
429*f4a2713aSLionel Sambuc void test_deprecated_1(int a) __attribute__((deprecated));
430*f4a2713aSLionel Sambuc 
431*f4a2713aSLionel Sambuc // We don't want \deprecated to warn about empty paragraph.  It is fine to use
432*f4a2713aSLionel Sambuc // \deprecated by itself without explanations.
433*f4a2713aSLionel Sambuc 
434*f4a2713aSLionel Sambuc /// Aaa
435*f4a2713aSLionel Sambuc /// \deprecated
436*f4a2713aSLionel Sambuc void test_deprecated_2(int a) __attribute__((deprecated));
437*f4a2713aSLionel Sambuc 
438*f4a2713aSLionel Sambuc /// Aaa
439*f4a2713aSLionel Sambuc /// \deprecated
440*f4a2713aSLionel Sambuc void test_deprecated_3(int a) __attribute__((availability(macosx,introduced=10.4)));
441*f4a2713aSLionel Sambuc 
442*f4a2713aSLionel Sambuc /// Aaa
443*f4a2713aSLionel Sambuc /// \deprecated
444*f4a2713aSLionel Sambuc void test_deprecated_4(int a) __attribute__((unavailable));
445*f4a2713aSLionel Sambuc 
446*f4a2713aSLionel Sambuc // 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}}
447*f4a2713aSLionel Sambuc /// Aaa
448*f4a2713aSLionel Sambuc /// \deprecated
449*f4a2713aSLionel Sambuc void test_deprecated_5(int a);
450*f4a2713aSLionel Sambuc 
451*f4a2713aSLionel Sambuc // 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}}
452*f4a2713aSLionel Sambuc /// Aaa
453*f4a2713aSLionel Sambuc /// \deprecated
454*f4a2713aSLionel Sambuc void test_deprecated_6(int a) {
455*f4a2713aSLionel Sambuc }
456*f4a2713aSLionel Sambuc 
457*f4a2713aSLionel Sambuc // expected-warning@+2 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}}
458*f4a2713aSLionel Sambuc /// Aaa
459*f4a2713aSLionel Sambuc /// \deprecated
460*f4a2713aSLionel Sambuc template<typename T>
461*f4a2713aSLionel Sambuc void test_deprecated_7(T aaa);
462*f4a2713aSLionel Sambuc 
463*f4a2713aSLionel Sambuc 
464*f4a2713aSLionel Sambuc // rdar://12397511
465*f4a2713aSLionel Sambuc // expected-note@+2 {{previous command '\headerfile' here}}
466*f4a2713aSLionel Sambuc // expected-warning@+2 {{duplicated command '\headerfile'}}
467*f4a2713aSLionel Sambuc /// \headerfile ""
468*f4a2713aSLionel Sambuc /// \headerfile foo.h
469*f4a2713aSLionel Sambuc int test__headerfile_1(int a);
470*f4a2713aSLionel Sambuc 
471*f4a2713aSLionel Sambuc 
472*f4a2713aSLionel Sambuc /// \invariant aaa
473*f4a2713aSLionel Sambuc void test_invariant_1(int a);
474*f4a2713aSLionel Sambuc 
475*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\invariant' command}}
476*f4a2713aSLionel Sambuc /// \invariant
477*f4a2713aSLionel Sambuc void test_invariant_2(int a);
478*f4a2713aSLionel Sambuc 
479*f4a2713aSLionel Sambuc 
480*f4a2713aSLionel Sambuc // no-warning
481*f4a2713aSLionel Sambuc /// \returns Aaa
482*f4a2713aSLionel Sambuc int test_returns_right_decl_1(int);
483*f4a2713aSLionel Sambuc 
484*f4a2713aSLionel Sambuc class test_returns_right_decl_2 {
485*f4a2713aSLionel Sambuc   // no-warning
486*f4a2713aSLionel Sambuc   /// \returns Aaa
487*f4a2713aSLionel Sambuc   int test_returns_right_decl_3(int);
488*f4a2713aSLionel Sambuc };
489*f4a2713aSLionel Sambuc 
490*f4a2713aSLionel Sambuc // no-warning
491*f4a2713aSLionel Sambuc /// \returns Aaa
492*f4a2713aSLionel Sambuc template<typename T>
493*f4a2713aSLionel Sambuc int test_returns_right_decl_4(T aaa);
494*f4a2713aSLionel Sambuc 
495*f4a2713aSLionel Sambuc // no-warning
496*f4a2713aSLionel Sambuc /// \returns Aaa
497*f4a2713aSLionel Sambuc template<>
498*f4a2713aSLionel Sambuc int test_returns_right_decl_4(int aaa);
499*f4a2713aSLionel Sambuc 
500*f4a2713aSLionel Sambuc /// \returns Aaa
501*f4a2713aSLionel Sambuc template<typename T>
502*f4a2713aSLionel Sambuc T test_returns_right_decl_5(T aaa);
503*f4a2713aSLionel Sambuc 
504*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
505*f4a2713aSLionel Sambuc /// \returns Aaa
506*f4a2713aSLionel Sambuc int test_returns_wrong_decl_1;
507*f4a2713aSLionel Sambuc 
508*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
509*f4a2713aSLionel Sambuc /// \return Aaa
510*f4a2713aSLionel Sambuc int test_returns_wrong_decl_2;
511*f4a2713aSLionel Sambuc 
512*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\result' command used in a comment that is not attached to a function or method declaration}}
513*f4a2713aSLionel Sambuc /// \result Aaa
514*f4a2713aSLionel Sambuc int test_returns_wrong_decl_3;
515*f4a2713aSLionel Sambuc 
516*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
517*f4a2713aSLionel Sambuc /// \returns Aaa
518*f4a2713aSLionel Sambuc void test_returns_wrong_decl_4(int);
519*f4a2713aSLionel Sambuc 
520*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
521*f4a2713aSLionel Sambuc /// \returns Aaa
522*f4a2713aSLionel Sambuc template<typename T>
523*f4a2713aSLionel Sambuc void test_returns_wrong_decl_5(T aaa);
524*f4a2713aSLionel Sambuc 
525*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is attached to a function returning void}}
526*f4a2713aSLionel Sambuc /// \returns Aaa
527*f4a2713aSLionel Sambuc template<>
528*f4a2713aSLionel Sambuc void test_returns_wrong_decl_5(int aaa);
529*f4a2713aSLionel Sambuc 
530*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
531*f4a2713aSLionel Sambuc /// \returns Aaa
532*f4a2713aSLionel Sambuc struct test_returns_wrong_decl_6 { };
533*f4a2713aSLionel Sambuc 
534*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
535*f4a2713aSLionel Sambuc /// \returns Aaa
536*f4a2713aSLionel Sambuc class test_returns_wrong_decl_7 {
537*f4a2713aSLionel Sambuc   // expected-warning@+1 {{'\returns' command used in a comment that is attached to a constructor}}
538*f4a2713aSLionel Sambuc   /// \returns Aaa
539*f4a2713aSLionel Sambuc   test_returns_wrong_decl_7();
540*f4a2713aSLionel Sambuc 
541*f4a2713aSLionel Sambuc   // expected-warning@+1 {{'\returns' command used in a comment that is attached to a destructor}}
542*f4a2713aSLionel Sambuc   /// \returns Aaa
543*f4a2713aSLionel Sambuc   ~test_returns_wrong_decl_7();
544*f4a2713aSLionel Sambuc };
545*f4a2713aSLionel Sambuc 
546*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
547*f4a2713aSLionel Sambuc /// \returns Aaa
548*f4a2713aSLionel Sambuc enum test_returns_wrong_decl_8 {
549*f4a2713aSLionel Sambuc   // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
550*f4a2713aSLionel Sambuc   /// \returns Aaa
551*f4a2713aSLionel Sambuc   test_returns_wrong_decl_9
552*f4a2713aSLionel Sambuc };
553*f4a2713aSLionel Sambuc 
554*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
555*f4a2713aSLionel Sambuc /// \returns Aaa
556*f4a2713aSLionel Sambuc namespace test_returns_wrong_decl_10 { };
557*f4a2713aSLionel Sambuc 
558*f4a2713aSLionel Sambuc // rdar://13066276
559*f4a2713aSLionel Sambuc // expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
560*f4a2713aSLionel Sambuc /// @returns Aaa
561*f4a2713aSLionel Sambuc typedef unsigned int test_returns_wrong_decl_11;
562*f4a2713aSLionel Sambuc 
563*f4a2713aSLionel Sambuc // rdar://13094352
564*f4a2713aSLionel Sambuc // expected-warning@+1 {{'@function' command should be used in a comment attached to a function declaration}}
565*f4a2713aSLionel Sambuc /*!	@function test_function
566*f4a2713aSLionel Sambuc */
567*f4a2713aSLionel Sambuc typedef unsigned int Base64Flags;
568*f4a2713aSLionel Sambuc unsigned test_function(Base64Flags inFlags);
569*f4a2713aSLionel Sambuc 
570*f4a2713aSLionel Sambuc // expected-warning@+1 {{'@callback' command should be used in a comment attached to a pointer to function declaration}}
571*f4a2713aSLionel Sambuc /*! @callback test_callback
572*f4a2713aSLionel Sambuc */
573*f4a2713aSLionel Sambuc typedef unsigned int BaseFlags;
574*f4a2713aSLionel Sambuc unsigned (*test_callback)(BaseFlags inFlags);
575*f4a2713aSLionel Sambuc 
576*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\endverbatim' command does not terminate a verbatim text block}}
577*f4a2713aSLionel Sambuc /// \endverbatim
578*f4a2713aSLionel Sambuc int test_verbatim_1();
579*f4a2713aSLionel Sambuc 
580*f4a2713aSLionel Sambuc // expected-warning@+1 {{'\endcode' command does not terminate a verbatim text block}}
581*f4a2713aSLionel Sambuc /// \endcode
582*f4a2713aSLionel Sambuc int test_verbatim_2();
583*f4a2713aSLionel Sambuc 
584*f4a2713aSLionel Sambuc // FIXME: we give a bad diagnostic here because we throw away non-documentation
585*f4a2713aSLionel Sambuc // comments early.
586*f4a2713aSLionel Sambuc //
587*f4a2713aSLionel Sambuc // expected-warning@+3 {{'\endcode' command does not terminate a verbatim text block}}
588*f4a2713aSLionel Sambuc /// \code
589*f4a2713aSLionel Sambuc //  foo
590*f4a2713aSLionel Sambuc /// \endcode
591*f4a2713aSLionel Sambuc int test_verbatim_3();
592*f4a2713aSLionel Sambuc 
593*f4a2713aSLionel Sambuc 
594*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
595*f4a2713aSLionel Sambuc int test1; ///< \brief\author Aaa
596*f4a2713aSLionel Sambuc 
597*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
598*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
599*f4a2713aSLionel Sambuc int test2, ///< \brief\author Aaa
600*f4a2713aSLionel Sambuc     test3; ///< \brief\author Aaa
601*f4a2713aSLionel Sambuc 
602*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
603*f4a2713aSLionel Sambuc int test4; ///< \brief
604*f4a2713aSLionel Sambuc            ///< \author Aaa
605*f4a2713aSLionel Sambuc 
606*f4a2713aSLionel Sambuc 
607*f4a2713aSLionel Sambuc class TestRelates {};
608*f4a2713aSLionel Sambuc 
609*f4a2713aSLionel Sambuc /// \relates TestRelates
610*f4a2713aSLionel Sambuc /// \brief Aaa
611*f4a2713aSLionel Sambuc void test_relates_1();
612*f4a2713aSLionel Sambuc 
613*f4a2713aSLionel Sambuc /// \related TestRelates
614*f4a2713aSLionel Sambuc /// \brief Aaa
615*f4a2713aSLionel Sambuc void test_relates_2();
616*f4a2713aSLionel Sambuc 
617*f4a2713aSLionel Sambuc /// \relatesalso TestRelates
618*f4a2713aSLionel Sambuc /// \brief Aaa
619*f4a2713aSLionel Sambuc void test_relates_3();
620*f4a2713aSLionel Sambuc 
621*f4a2713aSLionel Sambuc /// \relatedalso TestRelates
622*f4a2713aSLionel Sambuc /// \brief Aaa
623*f4a2713aSLionel Sambuc void test_relates_4();
624*f4a2713aSLionel Sambuc 
625*f4a2713aSLionel Sambuc 
626*f4a2713aSLionel Sambuc // Check that we attach the comment to the declaration during parsing in the
627*f4a2713aSLionel Sambuc // following cases.  The test is based on the fact that we don't parse
628*f4a2713aSLionel Sambuc // documentation comments that are not attached to anything.
629*f4a2713aSLionel Sambuc 
630*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
631*f4a2713aSLionel Sambuc /// \brief\author Aaa
632*f4a2713aSLionel Sambuc int test_attach1;
633*f4a2713aSLionel Sambuc 
634*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
635*f4a2713aSLionel Sambuc /// \brief\author Aaa
636*f4a2713aSLionel Sambuc int test_attach2(int);
637*f4a2713aSLionel Sambuc 
638*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
639*f4a2713aSLionel Sambuc /// \brief\author Aaa
640*f4a2713aSLionel Sambuc struct test_attach3 {
641*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
642*f4a2713aSLionel Sambuc   /// \brief\author Aaa
643*f4a2713aSLionel Sambuc   int test_attach4;
644*f4a2713aSLionel Sambuc 
645*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
646*f4a2713aSLionel Sambuc   int test_attach5; ///< \brief\author Aaa
647*f4a2713aSLionel Sambuc 
648*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
649*f4a2713aSLionel Sambuc   /// \brief\author Aaa
650*f4a2713aSLionel Sambuc   int test_attach6(int);
651*f4a2713aSLionel Sambuc };
652*f4a2713aSLionel Sambuc 
653*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
654*f4a2713aSLionel Sambuc /// \brief\author Aaa
655*f4a2713aSLionel Sambuc class test_attach7 {
656*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
657*f4a2713aSLionel Sambuc   /// \brief\author Aaa
658*f4a2713aSLionel Sambuc   int test_attach8;
659*f4a2713aSLionel Sambuc 
660*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
661*f4a2713aSLionel Sambuc   int test_attach9; ///< \brief\author Aaa
662*f4a2713aSLionel Sambuc 
663*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
664*f4a2713aSLionel Sambuc   /// \brief\author Aaa
665*f4a2713aSLionel Sambuc   int test_attach10(int);
666*f4a2713aSLionel Sambuc };
667*f4a2713aSLionel Sambuc 
668*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
669*f4a2713aSLionel Sambuc /// \brief\author Aaa
670*f4a2713aSLionel Sambuc enum test_attach9 {
671*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
672*f4a2713aSLionel Sambuc   /// \brief\author Aaa
673*f4a2713aSLionel Sambuc   test_attach10,
674*f4a2713aSLionel Sambuc 
675*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
676*f4a2713aSLionel Sambuc   test_attach11 ///< \brief\author Aaa
677*f4a2713aSLionel Sambuc };
678*f4a2713aSLionel Sambuc 
679*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
680*f4a2713aSLionel Sambuc /// \brief\author Aaa
681*f4a2713aSLionel Sambuc struct test_noattach12 *test_attach13;
682*f4a2713aSLionel Sambuc 
683*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
684*f4a2713aSLionel Sambuc /// \brief\author Aaa
685*f4a2713aSLionel Sambuc typedef struct test_noattach14 *test_attach15;
686*f4a2713aSLionel Sambuc 
687*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
688*f4a2713aSLionel Sambuc /// \brief\author Aaa
689*f4a2713aSLionel Sambuc typedef struct test_attach16 { int a; } test_attach17;
690*f4a2713aSLionel Sambuc 
691*f4a2713aSLionel Sambuc struct S { int a; };
692*f4a2713aSLionel Sambuc 
693*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
694*f4a2713aSLionel Sambuc /// \brief\author Aaa
695*f4a2713aSLionel Sambuc struct S *test_attach18;
696*f4a2713aSLionel Sambuc 
697*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
698*f4a2713aSLionel Sambuc /// \brief\author Aaa
699*f4a2713aSLionel Sambuc typedef struct S *test_attach19;
700*f4a2713aSLionel Sambuc 
701*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
702*f4a2713aSLionel Sambuc /// \brief\author Aaa
703*f4a2713aSLionel Sambuc struct test_attach20;
704*f4a2713aSLionel Sambuc 
705*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
706*f4a2713aSLionel Sambuc /// \brief\author Aaa
707*f4a2713aSLionel Sambuc typedef struct test_attach21 {
708*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
709*f4a2713aSLionel Sambuc   /// \brief\author Aaa
710*f4a2713aSLionel Sambuc   int test_attach22;
711*f4a2713aSLionel Sambuc } test_attach23;
712*f4a2713aSLionel Sambuc 
713*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
714*f4a2713aSLionel Sambuc /// \brief\author Aaa
715*f4a2713aSLionel Sambuc namespace test_attach24 {
716*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
717*f4a2713aSLionel Sambuc   /// \brief\author Aaa
718*f4a2713aSLionel Sambuc   namespace test_attach25 {
719*f4a2713aSLionel Sambuc   }
720*f4a2713aSLionel Sambuc }
721*f4a2713aSLionel Sambuc 
722*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
723*f4a2713aSLionel Sambuc /// \brief\author Aaa
724*f4a2713aSLionel Sambuc /// \tparam T Aaa
725*f4a2713aSLionel Sambuc template<typename T>
726*f4a2713aSLionel Sambuc void test_attach26(T aaa);
727*f4a2713aSLionel Sambuc 
728*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
729*f4a2713aSLionel Sambuc /// \brief\author Aaa
730*f4a2713aSLionel Sambuc /// \tparam T Aaa
731*f4a2713aSLionel Sambuc template<typename T, typename U>
732*f4a2713aSLionel Sambuc void test_attach27(T aaa, U bbb);
733*f4a2713aSLionel Sambuc 
734*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
735*f4a2713aSLionel Sambuc // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
736*f4a2713aSLionel Sambuc /// \brief\author Aaa
737*f4a2713aSLionel Sambuc /// \tparam T Aaa
738*f4a2713aSLionel Sambuc template<>
739*f4a2713aSLionel Sambuc void test_attach27(int aaa, int bbb);
740*f4a2713aSLionel Sambuc 
741*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
742*f4a2713aSLionel Sambuc /// \brief\author Aaa
743*f4a2713aSLionel Sambuc /// \tparam T Aaa
744*f4a2713aSLionel Sambuc template<typename T>
745*f4a2713aSLionel Sambuc class test_attach28 {
746*f4a2713aSLionel Sambuc   T aaa;
747*f4a2713aSLionel Sambuc };
748*f4a2713aSLionel Sambuc 
749*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
750*f4a2713aSLionel Sambuc /// \brief\author Aaa
751*f4a2713aSLionel Sambuc using test_attach29 = test_attach28<int>;
752*f4a2713aSLionel Sambuc 
753*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
754*f4a2713aSLionel Sambuc /// \brief\author Aaa
755*f4a2713aSLionel Sambuc /// \tparam T Aaa
756*f4a2713aSLionel Sambuc template<typename T, typename U>
757*f4a2713aSLionel Sambuc class test_attach30 { };
758*f4a2713aSLionel Sambuc 
759*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
760*f4a2713aSLionel Sambuc /// \brief\author Aaa
761*f4a2713aSLionel Sambuc /// \tparam T Aaa
762*f4a2713aSLionel Sambuc template<typename T>
763*f4a2713aSLionel Sambuc class test_attach30<T, int> { };
764*f4a2713aSLionel Sambuc 
765*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
766*f4a2713aSLionel Sambuc /// \brief\author Aaa
767*f4a2713aSLionel Sambuc template<>
768*f4a2713aSLionel Sambuc class test_attach30<int, int> { };
769*f4a2713aSLionel Sambuc 
770*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
771*f4a2713aSLionel Sambuc /// \brief\author Aaa
772*f4a2713aSLionel Sambuc template<typename T>
773*f4a2713aSLionel Sambuc using test_attach31 = test_attach30<T, int>;
774*f4a2713aSLionel Sambuc 
775*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
776*f4a2713aSLionel Sambuc /// \brief\author Aaa
777*f4a2713aSLionel Sambuc /// \tparam T Aaa
778*f4a2713aSLionel Sambuc template<typename T, typename U, typename V>
779*f4a2713aSLionel Sambuc class test_attach32 { };
780*f4a2713aSLionel Sambuc 
781*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
782*f4a2713aSLionel Sambuc /// \brief\author Aaa
783*f4a2713aSLionel Sambuc /// \tparam T Aaa
784*f4a2713aSLionel Sambuc template<typename T, typename U>
785*f4a2713aSLionel Sambuc class test_attach32<T, U, int> { };
786*f4a2713aSLionel Sambuc 
787*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
788*f4a2713aSLionel Sambuc /// \brief\author Aaa
789*f4a2713aSLionel Sambuc /// \tparam T Aaa
790*f4a2713aSLionel Sambuc template<typename T>
791*f4a2713aSLionel Sambuc class test_attach32<T, int, int> { };
792*f4a2713aSLionel Sambuc 
793*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
794*f4a2713aSLionel Sambuc // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
795*f4a2713aSLionel Sambuc /// \brief\author Aaa
796*f4a2713aSLionel Sambuc /// \tparam T Aaa
797*f4a2713aSLionel Sambuc template<>
798*f4a2713aSLionel Sambuc class test_attach32<int, int, int> { };
799*f4a2713aSLionel Sambuc 
800*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
801*f4a2713aSLionel Sambuc /// \brief\author Aaa
802*f4a2713aSLionel Sambuc class test_attach33 {
803*f4a2713aSLionel Sambuc   // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
804*f4a2713aSLionel Sambuc   /// \brief\author Aaa
805*f4a2713aSLionel Sambuc   /// \tparam T Aaa
806*f4a2713aSLionel Sambuc   template<typename T, typename U>
807*f4a2713aSLionel Sambuc   void test_attach34(T aaa, U bbb);
808*f4a2713aSLionel Sambuc };
809*f4a2713aSLionel Sambuc 
810*f4a2713aSLionel Sambuc template<typename T>
811*f4a2713aSLionel Sambuc class test_attach35 {
812*f4a2713aSLionel Sambuc   // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
813*f4a2713aSLionel Sambuc   // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
814*f4a2713aSLionel Sambuc   /// \brief\author Aaa
815*f4a2713aSLionel Sambuc   /// \tparam T Aaa
816*f4a2713aSLionel Sambuc   template<typename TT, typename UU>
817*f4a2713aSLionel Sambuc   void test_attach36(TT aaa, UU bbb);
818*f4a2713aSLionel Sambuc };
819*f4a2713aSLionel Sambuc 
820*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
821*f4a2713aSLionel Sambuc // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
822*f4a2713aSLionel Sambuc /// \brief\author Aaa
823*f4a2713aSLionel Sambuc /// \tparam T Aaa
824*f4a2713aSLionel Sambuc template<> template<>
825*f4a2713aSLionel Sambuc void test_attach35<int>::test_attach36(int aaa, int bbb) {}
826*f4a2713aSLionel Sambuc 
827*f4a2713aSLionel Sambuc template<typename T>
828*f4a2713aSLionel Sambuc class test_attach37 {
829*f4a2713aSLionel Sambuc   // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
830*f4a2713aSLionel Sambuc   // expected-warning@+2 {{'\tparam' command used in a comment that is not attached to a template declaration}}
831*f4a2713aSLionel Sambuc   /// \brief\author Aaa
832*f4a2713aSLionel Sambuc   /// \tparam T Aaa
833*f4a2713aSLionel Sambuc   void test_attach38(int aaa, int bbb);
834*f4a2713aSLionel Sambuc 
835*f4a2713aSLionel Sambuc   void test_attach39(int aaa, int bbb);
836*f4a2713aSLionel Sambuc };
837*f4a2713aSLionel Sambuc 
838*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\brief' command}}
839*f4a2713aSLionel Sambuc // expected-warning@+2 {{template parameter 'T' not found in the template declaration}}
840*f4a2713aSLionel Sambuc /// \brief\author Aaa
841*f4a2713aSLionel Sambuc /// \tparam T Aaa
842*f4a2713aSLionel Sambuc template<>
843*f4a2713aSLionel Sambuc void test_attach37<int>::test_attach38(int aaa, int bbb) {}
844*f4a2713aSLionel Sambuc 
845*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
846*f4a2713aSLionel Sambuc /// \brief\author Aaa
847*f4a2713aSLionel Sambuc /// \tparam T Aaa
848*f4a2713aSLionel Sambuc template<typename T>
849*f4a2713aSLionel Sambuc void test_attach37<T>::test_attach39(int aaa, int bbb) {}
850*f4a2713aSLionel Sambuc 
851*f4a2713aSLionel Sambuc // We used to emit warning that parameter 'a' is not found because we parsed
852*f4a2713aSLionel Sambuc // the comment in context of the redeclaration which does not have parameter
853*f4a2713aSLionel Sambuc // names.
854*f4a2713aSLionel Sambuc template <typename T>
855*f4a2713aSLionel Sambuc struct test_attach38 {
856*f4a2713aSLionel Sambuc   /*!
857*f4a2713aSLionel Sambuc     \param a  First param
858*f4a2713aSLionel Sambuc     \param b  Second param
859*f4a2713aSLionel Sambuc   */
860*f4a2713aSLionel Sambuc   template <typename B>
861*f4a2713aSLionel Sambuc   void test_attach39(T a, B b);
862*f4a2713aSLionel Sambuc };
863*f4a2713aSLionel Sambuc 
864*f4a2713aSLionel Sambuc template <>
865*f4a2713aSLionel Sambuc template <typename B>
866*f4a2713aSLionel Sambuc void test_attach38<int>::test_attach39(int, B);
867*f4a2713aSLionel Sambuc 
868*f4a2713aSLionel Sambuc 
869*f4a2713aSLionel Sambuc // PR13411, reduced.  We used to crash on this.
870*f4a2713aSLionel Sambuc /**
871*f4a2713aSLionel Sambuc  * @code Aaa.
872*f4a2713aSLionel Sambuc  */
873*f4a2713aSLionel Sambuc void test_nocrash1(int);
874*f4a2713aSLionel Sambuc 
875*f4a2713aSLionel Sambuc // We used to crash on this.
876*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '\param' command}}
877*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '\brief' command}}
878*f4a2713aSLionel Sambuc /// \param\brief
879*f4a2713aSLionel Sambuc void test_nocrash2(int);
880*f4a2713aSLionel Sambuc 
881*f4a2713aSLionel Sambuc // PR13593, example 1 and 2
882*f4a2713aSLionel Sambuc 
883*f4a2713aSLionel Sambuc /**
884*f4a2713aSLionel Sambuc * Bla.
885*f4a2713aSLionel Sambuc */
886*f4a2713aSLionel Sambuc template <typename>
887*f4a2713aSLionel Sambuc void test_nocrash3();
888*f4a2713aSLionel Sambuc 
889*f4a2713aSLionel Sambuc /// Foo
890*f4a2713aSLionel Sambuc template <typename, typename>
891*f4a2713aSLionel Sambuc void test_nocrash4() { }
892*f4a2713aSLionel Sambuc 
893*f4a2713aSLionel Sambuc template <typename>
894*f4a2713aSLionel Sambuc void test_nocrash3()
895*f4a2713aSLionel Sambuc {
896*f4a2713aSLionel Sambuc }
897*f4a2713aSLionel Sambuc 
898*f4a2713aSLionel Sambuc // PR13593, example 3
899*f4a2713aSLionel Sambuc 
900*f4a2713aSLionel Sambuc /**
901*f4a2713aSLionel Sambuc  * aaa
902*f4a2713aSLionel Sambuc  */
903*f4a2713aSLionel Sambuc template <typename T>
904*f4a2713aSLionel Sambuc inline T test_nocrash5(T a1)
905*f4a2713aSLionel Sambuc {
906*f4a2713aSLionel Sambuc     return a1;
907*f4a2713aSLionel Sambuc }
908*f4a2713aSLionel Sambuc 
909*f4a2713aSLionel Sambuc ///
910*f4a2713aSLionel Sambuc //,
911*f4a2713aSLionel Sambuc 
912*f4a2713aSLionel Sambuc inline void test_nocrash6()
913*f4a2713aSLionel Sambuc {
914*f4a2713aSLionel Sambuc     test_nocrash5(1);
915*f4a2713aSLionel Sambuc }
916*f4a2713aSLionel Sambuc 
917*f4a2713aSLionel Sambuc // We used to crash on this.
918*f4a2713aSLionel Sambuc 
919*f4a2713aSLionel Sambuc /*!
920*f4a2713aSLionel Sambuc   Blah.
921*f4a2713aSLionel Sambuc */
922*f4a2713aSLionel Sambuc typedef const struct test_nocrash7 * test_nocrash8;
923*f4a2713aSLionel Sambuc 
924*f4a2713aSLionel Sambuc // We used to crash on this.
925*f4a2713aSLionel Sambuc 
926*f4a2713aSLionel Sambuc // expected-warning@+1 {{unknown command tag name}}
927*f4a2713aSLionel Sambuc /// aaa \unknown aaa \unknown aaa
928*f4a2713aSLionel Sambuc int test_nocrash9;
929*f4a2713aSLionel Sambuc 
930*f4a2713aSLionel Sambuc // We used to crash on this.  PR15068
931*f4a2713aSLionel Sambuc 
932*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '@param' command}}
933*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '@param' command}}
934*f4a2713aSLionel Sambuc ///@param x
935*f4a2713aSLionel Sambuc ///@param y
936*f4a2713aSLionel Sambuc int test_nocrash10(int x, int y);
937*f4a2713aSLionel Sambuc 
938*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'x' not found in the function declaration}}
939*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '@param' command}} expected-warning@+2 {{parameter 'y' not found in the function declaration}}
940*f4a2713aSLionel Sambuc ///@param x
941*f4a2713aSLionel Sambuc ///@param y
942*f4a2713aSLionel Sambuc int test_nocrash11();
943*f4a2713aSLionel Sambuc 
944*f4a2713aSLionel Sambuc // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'x' not found in the function declaration}}
945*f4a2713aSLionel Sambuc // expected-warning@+3 {{empty paragraph passed to '@param' command}} expected-warning@+3 {{parameter 'y' not found in the function declaration}}
946*f4a2713aSLionel Sambuc /**
947*f4a2713aSLionel Sambuc @param x
948*f4a2713aSLionel Sambuc @param y
949*f4a2713aSLionel Sambuc **/
950*f4a2713aSLionel Sambuc int test_nocrash12();
951*f4a2713aSLionel Sambuc 
952*f4a2713aSLionel Sambuc // expected-warning@+2 {{empty paragraph passed to '@param' command}}
953*f4a2713aSLionel Sambuc // expected-warning@+1 {{empty paragraph passed to '@param' command}}
954*f4a2713aSLionel Sambuc ///@param x@param y
955*f4a2713aSLionel Sambuc int test_nocrash13(int x, int y);
956*f4a2713aSLionel Sambuc 
957*f4a2713aSLionel Sambuc // rdar://12379114
958*f4a2713aSLionel Sambuc // expected-warning@+2 {{'@union' command should not be used in a comment attached to a non-union declaration}}
959*f4a2713aSLionel Sambuc /*!
960*f4a2713aSLionel Sambuc    @union U This is new
961*f4a2713aSLionel Sambuc */
962*f4a2713aSLionel Sambuc struct U { int iS; };
963*f4a2713aSLionel Sambuc 
964*f4a2713aSLionel Sambuc /*!
965*f4a2713aSLionel Sambuc   @union U1
966*f4a2713aSLionel Sambuc */
967*f4a2713aSLionel Sambuc union U1 {int i; };
968*f4a2713aSLionel Sambuc 
969*f4a2713aSLionel Sambuc // expected-warning@+2 {{'@struct' command should not be used in a comment attached to a non-struct declaration}}
970*f4a2713aSLionel Sambuc /*!
971*f4a2713aSLionel Sambuc  @struct S2
972*f4a2713aSLionel Sambuc */
973*f4a2713aSLionel Sambuc union S2 {};
974*f4a2713aSLionel Sambuc 
975*f4a2713aSLionel Sambuc /*!
976*f4a2713aSLionel Sambuc   @class C1
977*f4a2713aSLionel Sambuc */
978*f4a2713aSLionel Sambuc class C1;
979*f4a2713aSLionel Sambuc 
980*f4a2713aSLionel Sambuc /*!
981*f4a2713aSLionel Sambuc   @struct S3;
982*f4a2713aSLionel Sambuc */
983*f4a2713aSLionel Sambuc class S3;
984*f4a2713aSLionel Sambuc 
985*f4a2713aSLionel Sambuc // rdar://14124702
986*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
987*f4a2713aSLionel Sambuc /// @class Predicate Predicate.h "lldb/Host/Predicate.h"
988*f4a2713aSLionel Sambuc /// @brief A C++ wrapper class for providing threaded access to a value
989*f4a2713aSLionel Sambuc /// of type T.
990*f4a2713aSLionel Sambuc ///
991*f4a2713aSLionel Sambuc /// A templatized class.
992*f4a2713aSLionel Sambuc /// specified values.
993*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
994*f4a2713aSLionel Sambuc template <class T, class T1>
995*f4a2713aSLionel Sambuc class Predicate
996*f4a2713aSLionel Sambuc {
997*f4a2713aSLionel Sambuc };
998*f4a2713aSLionel Sambuc 
999*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
1000*f4a2713aSLionel Sambuc /// @class Predicate<int, char> Predicate.h "lldb/Host/Predicate.h"
1001*f4a2713aSLionel Sambuc /// @brief A C++ wrapper class for providing threaded access to a value
1002*f4a2713aSLionel Sambuc /// of type T.
1003*f4a2713aSLionel Sambuc ///
1004*f4a2713aSLionel Sambuc /// A template specilization class.
1005*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
1006*f4a2713aSLionel Sambuc template<> class Predicate<int, char>
1007*f4a2713aSLionel Sambuc {
1008*f4a2713aSLionel Sambuc };
1009*f4a2713aSLionel Sambuc 
1010*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
1011*f4a2713aSLionel Sambuc /// @class Predicate<T, int> Predicate.h "lldb/Host/Predicate.h"
1012*f4a2713aSLionel Sambuc /// @brief A C++ wrapper class for providing threaded access to a value
1013*f4a2713aSLionel Sambuc /// of type T.
1014*f4a2713aSLionel Sambuc ///
1015*f4a2713aSLionel Sambuc /// A partial specialization template class.
1016*f4a2713aSLionel Sambuc //----------------------------------------------------------------------
1017*f4a2713aSLionel Sambuc template<class T> class Predicate<T, int>
1018*f4a2713aSLionel Sambuc {
1019*f4a2713aSLionel Sambuc };
1020*f4a2713aSLionel Sambuc 
1021*f4a2713aSLionel Sambuc /*!     @function test_function
1022*f4a2713aSLionel Sambuc */
1023*f4a2713aSLionel Sambuc template <class T> T test_function (T arg);
1024*f4a2713aSLionel Sambuc 
1025*f4a2713aSLionel Sambuc /*!     @function test_function<int>
1026*f4a2713aSLionel Sambuc */
1027*f4a2713aSLionel Sambuc template <> int test_function<int> (int arg);
1028