blob: 37ee0c8784160ff6b0649061df067af447582a90 [file] [log] [blame]
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +00001// Run lines are sensitive to line numbers and come below the code.
2
3#ifndef HEADER
4#define HEADER
5
6// Not a Doxygen comment. NOT_DOXYGEN
7void notdoxy1(void);
8
9/* Not a Doxygen comment. NOT_DOXYGEN */
10void notdoxy2(void);
11
12/*/ Not a Doxygen comment. NOT_DOXYGEN */
13void notdoxy3(void);
14
15/** Doxygen comment. isdoxy4 IS_DOXYGEN_SINGLE */
16void isdoxy4(void);
17
18/**
19 * Doxygen comment. isdoxy5 IS_DOXYGEN_SINGLE */
20void isdoxy5(void);
21
22/**
23 * Doxygen comment.
24 * isdoxy6 IS_DOXYGEN_SINGLE */
25void isdoxy6(void);
26
27/**
28 * Doxygen comment.
29 * isdoxy7 IS_DOXYGEN_SINGLE
30 */
31void isdoxy7(void);
32
33/*! Doxygen comment. isdoxy8 IS_DOXYGEN_SINGLE */
34void isdoxy8(void);
35
36/// Doxygen comment. isdoxy9 IS_DOXYGEN_SINGLE
37void isdoxy9(void);
38
39// Not a Doxygen comment. NOT_DOXYGEN
40/// Doxygen comment. isdoxy10 IS_DOXYGEN_SINGLE
41void isdoxy10(void);
42
43/// Doxygen comment. isdoxy11 IS_DOXYGEN_SINGLE
44// Not a Doxygen comment. NOT_DOXYGEN
45void isdoxy11(void);
46
47/** Doxygen comment. isdoxy12 IS_DOXYGEN_SINGLE */
48/* Not a Doxygen comment. NOT_DOXYGEN */
49void isdoxy12(void);
50
51/// Doxygen comment. isdoxy13 IS_DOXYGEN_START
52/// Doxygen comment. IS_DOXYGEN_END
53void isdoxy13(void);
54
55/// Doxygen comment. isdoxy14 IS_DOXYGEN_START
56/// Blah-blah-blah.
57/// Doxygen comment. IS_DOXYGEN_END
58void isdoxy14(void);
59
60/// Doxygen comment. isdoxy15 IS_DOXYGEN_START
61/** Blah-blah-blah */
62/// Doxygen comment. IS_DOXYGEN_END
63void isdoxy15(void);
64
65/** Blah-blah-blah. isdoxy16 IS_DOXYGEN_START *//** Blah */
66/// Doxygen comment. IS_DOXYGEN_END
67void isdoxy16(void);
68
69/// isdoxy17 IS_DOXYGEN_START
70// Not a Doxygen comment, but still picked up.
71/// IS_DOXYGEN_END
72void isdoxy17(void);
73
74unsigned
75// NOT_DOXYGEN
76/// isdoxy18 IS_DOXYGEN_START
77// Not a Doxygen comment, but still picked up.
78/// IS_DOXYGEN_END
79// NOT_DOXYGEN
80int isdoxy18(void);
81
82//! It all starts here. isdoxy19 IS_DOXYGEN_START
83/*! It's a little odd to continue line this,
84 *
85 * but we need more multi-line comments. */
86/// This comment comes before my other comments
87/** This is a block comment that is associated with the function f. It
88 * runs for three lines. IS_DOXYGEN_END
89 */
90void isdoxy19(int, int);
91
92// NOT IN THE COMMENT NOT_DOXYGEN
93/// This is a BCPL comment. isdoxy20 IS_DOXYGEN_START
94/// It has only two lines.
95/** But there are other blocks that are part of the comment, too. IS_DOXYGEN_END */
96void isdoxy20(int);
97
Dmitri Gribenko9c006762012-07-06 23:27:33 +000098void notdoxy21(int); ///< This is a member comment. isdoxy21 IS_DOXYGEN_NOT_ATTACHED
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +000099
Dmitri Gribenko9c006762012-07-06 23:27:33 +0000100void notdoxy22(int); /*!< This is a member comment. isdoxy22 IS_DOXYGEN_NOT_ATTACHED */
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000101
Dmitri Gribenko9c006762012-07-06 23:27:33 +0000102void notdoxy23(int); /**< This is a member comment. isdoxy23 IS_DOXYGEN_NOT_ATTACHED */
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000103
104void notdoxy24(int); // NOT_DOXYGEN
105
106/// IS_DOXYGEN_SINGLE
107struct isdoxy25 {
108};
109
110struct test26 {
111 /// IS_DOXYGEN_SINGLE
112 int isdoxy26;
113};
114
115struct test27 {
116 int isdoxy27; ///< IS_DOXYGEN_SINGLE
117};
118
119struct notdoxy28 {
120}; ///< IS_DOXYGEN_NOT_ATTACHED
121
122/// IS_DOXYGEN_SINGLE
123enum isdoxy29 {
124};
125
126enum notdoxy30 {
127}; ///< IS_DOXYGEN_NOT_ATTACHED
128
129/// IS_DOXYGEN_SINGLE
130namespace isdoxy31 {
131};
132
133namespace notdoxy32 {
134}; ///< IS_DOXYGEN_NOT_ATTACHED
135
136class test33 {
137 ///< IS_DOXYGEN_NOT_ATTACHED
138 int isdoxy33; ///< isdoxy33 IS_DOXYGEN_SINGLE
139 int isdoxy34; ///< isdoxy34 IS_DOXYGEN_SINGLE
140
141 ///< IS_DOXYGEN_NOT_ATTACHED
142 int isdoxy35, ///< isdoxy35 IS_DOXYGEN_SINGLE
143 isdoxy36; ///< isdoxy36 IS_DOXYGEN_SINGLE
144
145 ///< IS_DOXYGEN_NOT_ATTACHED
146 int isdoxy37 ///< isdoxy37 IS_DOXYGEN_SINGLE
147 , isdoxy38 ///< isdoxy38 IS_DOXYGEN_SINGLE
148 , isdoxy39; ///< isdoxy39 IS_DOXYGEN_SINGLE
149};
150
151// Verified that Doxygen attaches these.
152
153/// isdoxy40 IS_DOXYGEN_SINGLE
154// NOT_DOXYGEN
155void isdoxy40(int);
156
157unsigned
158/// isdoxy41 IS_DOXYGEN_SINGLE
159// NOT_DOXYGEN
160int isdoxy41(int);
161
162class test42 {
163 int isdoxy42; /* NOT_DOXYGEN */ ///< isdoxy42 IS_DOXYGEN_SINGLE
164};
165
Dmitri Gribenko2d44d772012-06-26 20:39:18 +0000166/// IS_DOXYGEN_START
167/// It is fine to have a command at the end of comment.
168///\brief
169///
170/// Some malformed command.
171/* \*/
172/**
173 * \brief Aaa aaaaaaa aaaa.
174 * IS_DOXYGEN_END
175 */
176void isdoxy43(void);
177
178/// IS_DOXYGEN_START Aaa bbb
179/// ccc.
180///
181/// Ddd eee.
182/// Fff.
183///
184/// Ggg. IS_DOXYGEN_END
185void isdoxy44(void);
186
187/// IS_DOXYGEN_START Aaa bbb
188/// ccc.
189///
190/// \brief
191/// Ddd eee.
192/// Fff.
193///
194/// Ggg. IS_DOXYGEN_END
195void isdoxy45(void);
196
Dmitri Gribenko659a7122012-07-17 18:35:14 +0000197/// IS_DOXYGEN_START Aaa bbb
198/// ccc.
199///
200/// \short
201/// Ddd eee.
202/// Fff.
203///
204/// Ggg. IS_DOXYGEN_END
205void isdoxy46(void);
206
Dmitri Gribenko8bdb58a2012-06-27 23:43:37 +0000207/// IS_DOXYGEN_NOT_ATTACHED
208#define FOO
Dmitri Gribenko659a7122012-07-17 18:35:14 +0000209void notdoxy47(void);
Dmitri Gribenko8bdb58a2012-06-27 23:43:37 +0000210
Dmitri Gribenkof199b9c2012-06-28 00:01:41 +0000211/// IS_DOXYGEN_START Aaa bbb
212/// \param ccc
213/// \returns ddd IS_DOXYGEN_END
Dmitri Gribenko659a7122012-07-17 18:35:14 +0000214void isdoxy48(int);
Dmitri Gribenkof199b9c2012-06-28 00:01:41 +0000215
Dmitri Gribenko72021ff2012-07-20 17:01:34 +0000216/// \brief IS_DOXYGEN_START Aaa
217/// \returns bbb IS_DOXYGEN_END
218void isdoxy49(void);
219
220/// \param ccc IS_DOXYGEN_START
221/// \returns ddd IS_DOXYGEN_END
222void isdoxy50(int);
223
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000224/// Aaa.
225void comment_to_html_conversion_1();
226
227/// \brief Aaa.
228void comment_to_html_conversion_2();
229
230/// \short Aaa.
231void comment_to_html_conversion_3();
232
233/// Aaa.
234///
235/// \brief Bbb.
236void comment_to_html_conversion_4();
237
238/// Aaa.
239///
240/// \brief Bbb.
241///
242/// Ccc.
243void comment_to_html_conversion_5();
244
245/// \brief Aaa.
246/// \brief Bbb.
247void comment_to_html_conversion_6();
248
249/// Aaa.
250///
251/// \return Bbb.
252void comment_to_html_conversion_7();
253
254/// Aaa.
255///
256/// \returns Bbb.
257void comment_to_html_conversion_8();
258
259/// \returns Aaa.
260/// \returns Bbb.
261void comment_to_html_conversion_9();
262
263/// Aaa.
264///
265/// Bbb.
266///
267/// \returns Ccc.
268void comment_to_html_conversion_10();
269
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000270/// \param
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000271void comment_to_html_conversion_11(int x1);
272
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000273/// \param x1 Aaa.
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000274void comment_to_html_conversion_12(int x1);
275
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000276/// \param zzz Aaa.
277void comment_to_html_conversion_13(int x1);
278
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000279/// \param x2 Bbb.
280/// \param x1 Aaa.
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000281void comment_to_html_conversion_14(int x1, int x2);
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000282
283/// \param x2 Bbb.
284/// \param zzz Aaa.
285/// \param x1 Aaa.
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000286void comment_to_html_conversion_15(int x1, int x2);
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000287
288/// \brief Aaa.
289///
290/// Bbb.
291///
292/// \param x2 Ddd.
293/// \param x1 Ccc.
294/// \returns Eee.
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000295void comment_to_html_conversion_16(int x1, int x2);
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000296
297/// <br><a href="http://example.com/">Aaa</a>
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000298void comment_to_html_conversion_17();
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000299
300/// \verbatim
301/// <a href="http://example.com/">Aaa</a>
302/// <a href='http://example.com/'>Aaa</a>
303/// \endverbatim
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000304void comment_to_html_conversion_18();
305
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000306/// \b Aaa
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000307void comment_to_html_conversion_19();
308
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000309/// \c Aaa \p Bbb
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000310void comment_to_html_conversion_20();
311
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000312/// \a Aaa \e Bbb \em Ccc
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000313void comment_to_html_conversion_21();
314
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000315/// \\ \@ \& \$ \# \< \> \% \" \. \::
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000316void comment_to_html_conversion_22();
317
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000318/// &amp; &lt; &gt; &quot;
319void comment_to_html_conversion_23();
320
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000321#endif
322
323// RUN: rm -rf %t
324// RUN: mkdir %t
325// RUN: %clang_cc1 -x c++ -emit-pch -o %t/out.pch %s
326// RUN: %clang_cc1 -x c++ -include-pch %t/out.pch -fsyntax-only %s
327
328// RUN: c-index-test -test-load-source all %s > %t/out.c-index-direct
329// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
330
331// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
332// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
333
334// Declarations without Doxygen comments should not pick up some Doxygen comments.
335// WRONG-NOT: notdoxy{{.*}}Comment=
336// WRONG-NOT: test{{.*}}Comment=
337
338// Non-Doxygen comments should not be attached to anything.
339// WRONG-NOT: NOT_DOXYGEN
340
341// Some Doxygen comments are not attached to anything.
342// WRONG-NOT: IS_DOXYGEN_NOT_ATTACHED
343
344// Ensure we don't pick up extra comments.
Dmitri Gribenko2d44d772012-06-26 20:39:18 +0000345// WRONG-NOT: IS_DOXYGEN_START{{.*}}IS_DOXYGEN_START{{.*}}BriefComment=
346// WRONG-NOT: IS_DOXYGEN_END{{.*}}IS_DOXYGEN_END{{.*}}BriefComment=
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000347
348// RUN: FileCheck %s < %t/out.c-index-direct
349// RUN: FileCheck %s < %t/out.c-index-pch
350
351// CHECK: annotate-comments.cpp:16:6: FunctionDecl=isdoxy4:{{.*}} isdoxy4 IS_DOXYGEN_SINGLE
352// CHECK: annotate-comments.cpp:20:6: FunctionDecl=isdoxy5:{{.*}} isdoxy5 IS_DOXYGEN_SINGLE
353// CHECK: annotate-comments.cpp:25:6: FunctionDecl=isdoxy6:{{.*}} isdoxy6 IS_DOXYGEN_SINGLE
354// CHECK: annotate-comments.cpp:31:6: FunctionDecl=isdoxy7:{{.*}} isdoxy7 IS_DOXYGEN_SINGLE
355// CHECK: annotate-comments.cpp:34:6: FunctionDecl=isdoxy8:{{.*}} isdoxy8 IS_DOXYGEN_SINGLE
356// CHECK: annotate-comments.cpp:37:6: FunctionDecl=isdoxy9:{{.*}} isdoxy9 IS_DOXYGEN_SINGLE
357// CHECK: annotate-comments.cpp:41:6: FunctionDecl=isdoxy10:{{.*}} isdoxy10 IS_DOXYGEN_SINGLE
358// CHECK: annotate-comments.cpp:53:6: FunctionDecl=isdoxy13:{{.*}} isdoxy13 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
359// CHECK: annotate-comments.cpp:58:6: FunctionDecl=isdoxy14:{{.*}} isdoxy14 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
360// CHECK: annotate-comments.cpp:63:6: FunctionDecl=isdoxy15:{{.*}} isdoxy15 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
361// CHECK: annotate-comments.cpp:67:6: FunctionDecl=isdoxy16:{{.*}} isdoxy16 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
362// CHECK: annotate-comments.cpp:72:6: FunctionDecl=isdoxy17:{{.*}} isdoxy17 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
363// CHECK: annotate-comments.cpp:80:5: FunctionDecl=isdoxy18:{{.*}} isdoxy18 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
364// CHECK: annotate-comments.cpp:90:6: FunctionDecl=isdoxy19:{{.*}} isdoxy19 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
365// CHECK: annotate-comments.cpp:96:6: FunctionDecl=isdoxy20:{{.*}} isdoxy20 IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000366// CHECK: annotate-comments.cpp:107:8: StructDecl=isdoxy25:{{.*}} IS_DOXYGEN_SINGLE
367// CHECK: annotate-comments.cpp:112:7: FieldDecl=isdoxy26:{{.*}} IS_DOXYGEN_SINGLE
368// CHECK: annotate-comments.cpp:116:7: FieldDecl=isdoxy27:{{.*}} IS_DOXYGEN_SINGLE
369// CHECK: annotate-comments.cpp:123:6: EnumDecl=isdoxy29:{{.*}} IS_DOXYGEN_SINGLE
370// CHECK: annotate-comments.cpp:130:11: Namespace=isdoxy31:{{.*}} IS_DOXYGEN_SINGLE
371// CHECK: annotate-comments.cpp:138:7: FieldDecl=isdoxy33:{{.*}} isdoxy33 IS_DOXYGEN_SINGLE
372// CHECK: annotate-comments.cpp:139:7: FieldDecl=isdoxy34:{{.*}} isdoxy34 IS_DOXYGEN_SINGLE
373// CHECK: annotate-comments.cpp:142:7: FieldDecl=isdoxy35:{{.*}} isdoxy35 IS_DOXYGEN_SINGLE
374// CHECK: annotate-comments.cpp:143:7: FieldDecl=isdoxy36:{{.*}} isdoxy36 IS_DOXYGEN_SINGLE
375// CHECK: annotate-comments.cpp:146:7: FieldDecl=isdoxy37:{{.*}} isdoxy37 IS_DOXYGEN_SINGLE
376// CHECK: annotate-comments.cpp:147:7: FieldDecl=isdoxy38:{{.*}} isdoxy38 IS_DOXYGEN_SINGLE
377// CHECK: annotate-comments.cpp:148:7: FieldDecl=isdoxy39:{{.*}} isdoxy39 IS_DOXYGEN_SINGLE
378// CHECK: annotate-comments.cpp:155:6: FunctionDecl=isdoxy40:{{.*}} isdoxy40 IS_DOXYGEN_SINGLE
379// CHECK: annotate-comments.cpp:160:5: FunctionDecl=isdoxy41:{{.*}} isdoxy41 IS_DOXYGEN_SINGLE
380// CHECK: annotate-comments.cpp:163:7: FieldDecl=isdoxy42:{{.*}} isdoxy42 IS_DOXYGEN_SINGLE
Dmitri Gribenko2d44d772012-06-26 20:39:18 +0000381// CHECK: annotate-comments.cpp:176:6: FunctionDecl=isdoxy43:{{.*}} IS_DOXYGEN_START{{.*}} IS_DOXYGEN_END
382
Dmitri Gribenkod558b522012-06-28 01:38:21 +0000383// CHECK: annotate-comments.cpp:185:6: FunctionDecl=isdoxy44:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb ccc.]
384// CHECK: annotate-comments.cpp:195:6: FunctionDecl=isdoxy45:{{.*}} BriefComment=[Ddd eee. Fff.]
Dmitri Gribenko659a7122012-07-17 18:35:14 +0000385// CHECK: annotate-comments.cpp:205:6: FunctionDecl=isdoxy46:{{.*}} BriefComment=[Ddd eee. Fff.]
386// CHECK: annotate-comments.cpp:214:6: FunctionDecl=isdoxy48:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa bbb]
Dmitri Gribenko72021ff2012-07-20 17:01:34 +0000387// CHECK: annotate-comments.cpp:218:6: FunctionDecl=isdoxy49:{{.*}} BriefComment=[IS_DOXYGEN_START Aaa]
388// CHECK: annotate-comments.cpp:222:6: FunctionDecl=isdoxy50:{{.*}} BriefComment=[Returns ddd IS_DOXYGEN_END]
Dmitri Gribenkoaa0cd852012-06-20 00:34:58 +0000389
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000390// CHECK: annotate-comments.cpp:225:6: FunctionDecl=comment_to_html_conversion_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
391// CHECK-NEXT: CommentAST=[
392// CHECK-NEXT: (CXComment_FullComment
393// CHECK-NEXT: (CXComment_Paragraph
394// CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))]
395// CHECK: annotate-comments.cpp:228:6: FunctionDecl=comment_to_html_conversion_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
396// CHECK-NEXT: CommentAST=[
397// CHECK-NEXT: (CXComment_FullComment
398// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
399// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
400// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
401// CHECK-NEXT: (CXComment_Paragraph
402// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
403// CHECK: annotate-comments.cpp:231:6: FunctionDecl=comment_to_html_conversion_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>]
404// CHECK-NEXT: CommentAST=[
405// CHECK-NEXT: (CXComment_FullComment
406// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
407// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
408// CHECK-NEXT: (CXComment_BlockCommand CommandName=[short]
409// CHECK-NEXT: (CXComment_Paragraph
410// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
411// CHECK: annotate-comments.cpp:236:6: FunctionDecl=comment_to_html_conversion_4:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>]
412// CHECK-NEXT: CommentAST=[
413// CHECK-NEXT: (CXComment_FullComment
414// CHECK-NEXT: (CXComment_Paragraph
415// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
416// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
417// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
418// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
419// CHECK-NEXT: (CXComment_Paragraph
420// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
421// CHECK: annotate-comments.cpp:243:6: FunctionDecl=comment_to_html_conversion_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>]
422// CHECK-NEXT: CommentAST=[
423// CHECK-NEXT: (CXComment_FullComment
424// CHECK-NEXT: (CXComment_Paragraph
425// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
426// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
427// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
428// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
429// CHECK-NEXT: (CXComment_Paragraph
430// CHECK-NEXT: (CXComment_Text Text=[ Bbb.])))
431// CHECK-NEXT: (CXComment_Paragraph
432// CHECK-NEXT: (CXComment_Text Text=[ Ccc.])))]
433// CHECK: annotate-comments.cpp:247:6: FunctionDecl=comment_to_html_conversion_6:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>]
434// CHECK-NEXT: CommentAST=[
435// CHECK-NEXT: (CXComment_FullComment
436// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
437// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
438// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
439// CHECK-NEXT: (CXComment_Paragraph
440// CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
441// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
442// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
443// CHECK-NEXT: (CXComment_Paragraph
444// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
445// CHECK: annotate-comments.cpp:252:6: FunctionDecl=comment_to_html_conversion_7:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p>]
446// CHECK-NEXT: CommentAST=[
447// CHECK-NEXT: (CXComment_FullComment
448// CHECK-NEXT: (CXComment_Paragraph
449// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
450// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
451// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
452// CHECK-NEXT: (CXComment_BlockCommand CommandName=[return]
453// CHECK-NEXT: (CXComment_Paragraph
454// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
455// CHECK: annotate-comments.cpp:257:6: FunctionDecl=comment_to_html_conversion_8:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p>]
456// CHECK-NEXT: CommentAST=[
457// CHECK-NEXT: (CXComment_FullComment
458// CHECK-NEXT: (CXComment_Paragraph
459// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
460// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
461// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
462// CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
463// CHECK-NEXT: (CXComment_Paragraph
464// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
465// CHECK: annotate-comments.cpp:261:6: FunctionDecl=comment_to_html_conversion_9:{{.*}} FullCommentAsHTML=[<p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p><p class="para-returns"><span class="word-returns">Returns</span> Aaa. </p>]
466// CHECK-NEXT: CommentAST=[
467// CHECK-NEXT: (CXComment_FullComment
468// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
469// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
470// CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
471// CHECK-NEXT: (CXComment_Paragraph
472// CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
473// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
474// CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
475// CHECK-NEXT: (CXComment_Paragraph
476// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
477// CHECK: annotate-comments.cpp:268:6: FunctionDecl=comment_to_html_conversion_10:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><p class="para-returns"><span class="word-returns">Returns</span> Ccc.</p>]
478// CHECK-NEXT: CommentAST=[
479// CHECK-NEXT: (CXComment_FullComment
480// CHECK-NEXT: (CXComment_Paragraph
481// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
482// CHECK-NEXT: (CXComment_Paragraph
483// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))
484// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
485// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
486// CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
487// CHECK-NEXT: (CXComment_Paragraph
488// CHECK-NEXT: (CXComment_Text Text=[ Ccc.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000489// CHECK: annotate-comments.cpp:271:6: FunctionDecl=comment_to_html_conversion_11:{{.*}} FullCommentAsHTML=[]
490// CHECK-NEXT: CommentAST=[
491// CHECK-NEXT: (CXComment_FullComment
492// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
493// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
494// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[] ParamIndex=Invalid
495// CHECK-NEXT: (CXComment_Paragraph IsWhitespace)))]
496// CHECK: annotate-comments.cpp:274:6: FunctionDecl=comment_to_html_conversion_12:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd></dl>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000497// CHECK-NEXT: CommentAST=[
498// CHECK-NEXT: (CXComment_FullComment
499// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
500// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
501// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
502// CHECK-NEXT: (CXComment_Paragraph
503// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000504// CHECK: annotate-comments.cpp:277:6: FunctionDecl=comment_to_html_conversion_13:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa.</dd></dl>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000505// CHECK-NEXT: CommentAST=[
506// CHECK-NEXT: (CXComment_FullComment
507// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
508// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
509// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
510// CHECK-NEXT: (CXComment_Paragraph
511// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000512// CHECK: annotate-comments.cpp:281:6: FunctionDecl=comment_to_html_conversion_14:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd></dl>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000513// CHECK-NEXT: CommentAST=[
514// CHECK-NEXT: (CXComment_FullComment
515// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
516// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
517// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
518// CHECK-NEXT: (CXComment_Paragraph
519// CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
520// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
521// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
522// CHECK-NEXT: (CXComment_Paragraph
523// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000524// CHECK: annotate-comments.cpp:286:6: FunctionDecl=comment_to_html_conversion_15:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa. </dd></dl>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000525// CHECK-NEXT: CommentAST=[
526// CHECK-NEXT: (CXComment_FullComment
527// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
528// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
529// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
530// CHECK-NEXT: (CXComment_Paragraph
531// CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
532// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
533// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
534// CHECK-NEXT: (CXComment_Paragraph
535// CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
536// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
537// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
538// CHECK-NEXT: (CXComment_Paragraph
539// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000540// CHECK: annotate-comments.cpp:295:6: FunctionDecl=comment_to_html_conversion_16:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Ccc. </dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Ddd. </dd></dl><p class="para-returns"><span class="word-returns">Returns</span> Eee.</p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000541// CHECK-NEXT: CommentAST=[
542// CHECK-NEXT: (CXComment_FullComment
543// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
544// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
545// CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
546// CHECK-NEXT: (CXComment_Paragraph
547// CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))
548// CHECK-NEXT: (CXComment_Paragraph
549// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))
550// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
551// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
552// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
553// CHECK-NEXT: (CXComment_Paragraph
554// CHECK-NEXT: (CXComment_Text Text=[ Ddd.] HasTrailingNewline)
555// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
556// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
557// CHECK-NEXT: (CXComment_Paragraph
558// CHECK-NEXT: (CXComment_Text Text=[ Ccc.] HasTrailingNewline)
559// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
560// CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
561// CHECK-NEXT: (CXComment_Paragraph
562// CHECK-NEXT: (CXComment_Text Text=[ Eee.]))))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000563// CHECK: annotate-comments.cpp:298:6: FunctionDecl=comment_to_html_conversion_17:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <br><a href="http://example.com/">Aaa</a></p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000564// CHECK-NEXT: CommentAST=[
565// CHECK-NEXT: (CXComment_FullComment
566// CHECK-NEXT: (CXComment_Paragraph
567// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
568// CHECK-NEXT: (CXComment_HTMLStartTag Name=[br])
569// CHECK-NEXT: (CXComment_HTMLStartTag Name=[a] Attrs: href=http://example.com/)
570// CHECK-NEXT: (CXComment_Text Text=[Aaa])
571// CHECK-NEXT: (CXComment_HTMLEndTag Name=[a])))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000572// CHECK: annotate-comments.cpp:304:6: FunctionDecl=comment_to_html_conversion_18:{{.*}} FullCommentAsHTML=[<pre> &lt;a href=&quot;http:&#47;&#47;example.com&#47;&quot;&gt;Aaa&lt;&#47;a&gt;\n &lt;a href=&#39;http:&#47;&#47;example.com&#47;&#39;&gt;Aaa&lt;&#47;a&gt;</pre>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000573// CHECK-NEXT: CommentAST=[
574// CHECK-NEXT: (CXComment_FullComment
575// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
576// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
577// CHECK-NEXT: (CXComment_VerbatimBlockCommand CommandName=[verbatim]
578// CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ <a href="http://example.com/">Aaa</a>])
579// CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ <a href='http://example.com/'>Aaa</a>])))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000580// CHECK: annotate-comments.cpp:307:6: FunctionDecl=comment_to_html_conversion_19:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <b>Aaa</b></p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000581// CHECK-NEXT: CommentAST=[
582// CHECK-NEXT: (CXComment_FullComment
583// CHECK-NEXT: (CXComment_Paragraph
584// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000585// CHECK-NEXT: (CXComment_InlineCommand CommandName=[b] RenderBold Arg[0]=Aaa)))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000586// CHECK: annotate-comments.cpp:310:6: FunctionDecl=comment_to_html_conversion_20:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <tt>Aaa</tt> <tt>Bbb</tt></p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000587// CHECK-NEXT: CommentAST=[
588// CHECK-NEXT: (CXComment_FullComment
589// CHECK-NEXT: (CXComment_Paragraph
590// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000591// CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=Aaa)
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000592// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000593// CHECK-NEXT: (CXComment_InlineCommand CommandName=[p] RenderMonospaced Arg[0]=Bbb)))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000594// CHECK: annotate-comments.cpp:313:6: FunctionDecl=comment_to_html_conversion_21:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>Aaa</em> <em>Bbb</em> <em>Ccc</em></p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000595// CHECK-NEXT: CommentAST=[
596// CHECK-NEXT: (CXComment_FullComment
597// CHECK-NEXT: (CXComment_Paragraph
598// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000599// CHECK-NEXT: (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=Aaa)
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000600// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000601// CHECK-NEXT: (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=Bbb)
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000602// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
Dmitri Gribenko2d66a502012-07-23 16:43:01 +0000603// CHECK-NEXT: (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=Ccc)))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000604// CHECK: annotate-comments.cpp:316:6: FunctionDecl=comment_to_html_conversion_22:{{.*}} FullCommentAsHTML=[<p class="para-brief"> \ @ &amp; $ # &lt; &gt; % &quot; . ::</p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000605// CHECK-NEXT: CommentAST=[
606// CHECK-NEXT: (CXComment_FullComment
607// CHECK-NEXT: (CXComment_Paragraph
608// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
609// CHECK-NEXT: (CXComment_Text Text=[\])
610// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
611// CHECK-NEXT: (CXComment_Text Text=[@])
612// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
613// CHECK-NEXT: (CXComment_Text Text=[&])
614// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
615// CHECK-NEXT: (CXComment_Text Text=[$])
616// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
617// CHECK-NEXT: (CXComment_Text Text=[#])
618// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
619// CHECK-NEXT: (CXComment_Text Text=[<])
620// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
621// CHECK-NEXT: (CXComment_Text Text=[>])
622// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
623// CHECK-NEXT: (CXComment_Text Text=[%])
624// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
625// CHECK-NEXT: (CXComment_Text Text=["])
626// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
627// CHECK-NEXT: (CXComment_Text Text=[.])
628// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
629// CHECK-NEXT: (CXComment_Text Text=[::])))]
Dmitri Gribenko1f8c5292012-07-23 19:41:49 +0000630// CHECK: annotate-comments.cpp:319:6: FunctionDecl=comment_to_html_conversion_23:{{.*}} FullCommentAsHTML=[<p class="para-brief"> &amp;amp; &amp;lt; &amp;gt; &amp;quot;</p>]
Dmitri Gribenkoae99b752012-07-20 21:34:34 +0000631// CHECK: CommentAST=[
632// CHECK: (CXComment_FullComment
633// CHECK: (CXComment_Paragraph
634// CHECK: (CXComment_Text Text=[ &amp; &lt; &gt; &quot;])))]
635