comment-to-html-xml-conversion.cpp 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059
  1. // RUN: rm -rf %t
  2. // RUN: mkdir %t
  3. // This file contains UTF-8 sequences. Please don't "fix" them!
  4. // Check that we serialize comment source locations properly.
  5. // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t/out.pch %s
  6. // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t/out.pch -fsyntax-only %s
  7. // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 > %t/out.c-index-direct
  8. // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
  9. // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
  10. // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
  11. // Ensure that XML is not invalid
  12. // WRONG-NOT: CommentXMLInvalid
  13. // RUN: FileCheck %s < %t/out.c-index-direct
  14. // RUN: FileCheck %s < %t/out.c-index-pch
  15. // XFAIL: msan
  16. // XFAIL: valgrind
  17. #ifndef HEADER
  18. #define HEADER
  19. //===---
  20. // Tests for \brief and its aliases.
  21. //===---
  22. /// Aaa.
  23. void test_cmd_brief_like_1();
  24. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_1:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_1</Name><USR>c:@F@test_cmd_brief_like_1#</USR><Declaration>void test_cmd_brief_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  25. // CHECK-NEXT: CommentAST=[
  26. // CHECK-NEXT: (CXComment_FullComment
  27. // CHECK-NEXT: (CXComment_Paragraph
  28. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))]
  29. /// \brief Aaa.
  30. void test_cmd_brief_like_2();
  31. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_2:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_2</Name><USR>c:@F@test_cmd_brief_like_2#</USR><Declaration>void test_cmd_brief_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  32. // CHECK-NEXT: CommentAST=[
  33. // CHECK-NEXT: (CXComment_FullComment
  34. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  35. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  36. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  37. // CHECK-NEXT: (CXComment_Paragraph
  38. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  39. /// \short Aaa.
  40. void test_cmd_brief_like_3();
  41. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_3:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_3</Name><USR>c:@F@test_cmd_brief_like_3#</USR><Declaration>void test_cmd_brief_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  42. // CHECK-NEXT: CommentAST=[
  43. // CHECK-NEXT: (CXComment_FullComment
  44. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  45. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  46. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[short]
  47. // CHECK-NEXT: (CXComment_Paragraph
  48. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  49. /// Aaa.
  50. ///
  51. /// \brief Bbb.
  52. void test_cmd_brief_like_4();
  53. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_4:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_4</Name><USR>c:@F@test_cmd_brief_like_4#</USR><Declaration>void test_cmd_brief_like_4()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para></Discussion></Function>]
  54. // CHECK-NEXT: CommentAST=[
  55. // CHECK-NEXT: (CXComment_FullComment
  56. // CHECK-NEXT: (CXComment_Paragraph
  57. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  58. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  59. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  60. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  61. // CHECK-NEXT: (CXComment_Paragraph
  62. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  63. /// Aaa.
  64. ///
  65. /// \brief Bbb.
  66. ///
  67. /// Ccc.
  68. void test_cmd_brief_like_5();
  69. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_5:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_5</Name><USR>c:@F@test_cmd_brief_like_5#</USR><Declaration>void test_cmd_brief_like_5()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para><Para> Ccc.</Para></Discussion></Function>]
  70. // CHECK-NEXT: CommentAST=[
  71. // CHECK-NEXT: (CXComment_FullComment
  72. // CHECK-NEXT: (CXComment_Paragraph
  73. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  74. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  75. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  76. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  77. // CHECK-NEXT: (CXComment_Paragraph
  78. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.])))
  79. // CHECK-NEXT: (CXComment_Paragraph
  80. // CHECK-NEXT: (CXComment_Text Text=[ Ccc.])))]
  81. /// \brief Aaa.
  82. /// \brief Bbb.
  83. void test_cmd_brief_like_6();
  84. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_6:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_6</Name><USR>c:@F@test_cmd_brief_like_6#</USR><Declaration>void test_cmd_brief_like_6()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
  85. // CHECK-NEXT: CommentAST=[
  86. // CHECK-NEXT: (CXComment_FullComment
  87. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  88. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  89. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  90. // CHECK-NEXT: (CXComment_Paragraph
  91. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  92. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  93. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  94. // CHECK-NEXT: (CXComment_Paragraph
  95. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  96. /// \abstract Aaa.
  97. ///
  98. /// Bbb.
  99. void test_cmd_brief_like_7();
  100. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_7:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_7</Name><USR>c:@F@test_cmd_brief_like_7#</USR><Declaration>void test_cmd_brief_like_7()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
  101. // CHECK-NEXT: CommentAST=[
  102. // CHECK-NEXT: (CXComment_FullComment
  103. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  104. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  105. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[abstract]
  106. // CHECK-NEXT: (CXComment_Paragraph
  107. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))
  108. // CHECK-NEXT: (CXComment_Paragraph
  109. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.])))]
  110. //===---
  111. // Tests for \returns and its aliases.
  112. //===---
  113. /// Aaa.
  114. ///
  115. /// \return Bbb.
  116. void test_cmd_returns_like_1();
  117. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_1</Name><USR>c:@F@test_cmd_returns_like_1#</USR><Declaration>void test_cmd_returns_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
  118. // CHECK-NEXT: CommentAST=[
  119. // CHECK-NEXT: (CXComment_FullComment
  120. // CHECK-NEXT: (CXComment_Paragraph
  121. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  122. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  123. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  124. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[return]
  125. // CHECK-NEXT: (CXComment_Paragraph
  126. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  127. /// Aaa.
  128. ///
  129. /// \returns Bbb.
  130. void test_cmd_returns_like_2();
  131. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_2</Name><USR>c:@F@test_cmd_returns_like_2#</USR><Declaration>void test_cmd_returns_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
  132. // CHECK-NEXT: CommentAST=[
  133. // CHECK-NEXT: (CXComment_FullComment
  134. // CHECK-NEXT: (CXComment_Paragraph
  135. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  136. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  137. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  138. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
  139. // CHECK-NEXT: (CXComment_Paragraph
  140. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  141. /// Aaa.
  142. ///
  143. /// \result Bbb.
  144. void test_cmd_returns_like_3();
  145. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_3</Name><USR>c:@F@test_cmd_returns_like_3#</USR><Declaration>void test_cmd_returns_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
  146. // CHECK-NEXT: CommentAST=[
  147. // CHECK-NEXT: (CXComment_FullComment
  148. // CHECK-NEXT: (CXComment_Paragraph
  149. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  150. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  151. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  152. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[result]
  153. // CHECK-NEXT: (CXComment_Paragraph
  154. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  155. /// \returns Aaa.
  156. /// \returns Bbb.
  157. void test_cmd_returns_like_4();
  158. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_4:{{.*}} FullCommentAsHTML=[<div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Aaa. </p><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_4</Name><USR>c:@F@test_cmd_returns_like_4#</USR><Declaration>void test_cmd_returns_like_4()</Declaration><ResultDiscussion><Para> Aaa. </Para><Para> Bbb.</Para></ResultDiscussion></Function>]
  159. // CHECK-NEXT: CommentAST=[
  160. // CHECK-NEXT: (CXComment_FullComment
  161. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  162. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  163. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
  164. // CHECK-NEXT: (CXComment_Paragraph
  165. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  166. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  167. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
  168. // CHECK-NEXT: (CXComment_Paragraph
  169. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  170. /// Aaa.
  171. ///
  172. /// Bbb.
  173. ///
  174. /// \returns Ccc.
  175. void test_cmd_returns_like_5();
  176. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Ccc.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_5</Name><USR>c:@F@test_cmd_returns_like_5#</USR><Declaration>void test_cmd_returns_like_5()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Ccc.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
  177. // CHECK-NEXT: CommentAST=[
  178. // CHECK-NEXT: (CXComment_FullComment
  179. // CHECK-NEXT: (CXComment_Paragraph
  180. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))
  181. // CHECK-NEXT: (CXComment_Paragraph
  182. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))
  183. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  184. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  185. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
  186. // CHECK-NEXT: (CXComment_Paragraph
  187. // CHECK-NEXT: (CXComment_Text Text=[ Ccc.]))))]
  188. //===---
  189. // Tests for \param.
  190. //===---
  191. /// \param
  192. void test_cmd_param_1(int x1);
  193. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_1:{{.*}} FullCommentAsHTML=[] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_1</Name><USR>c:@F@test_cmd_param_1#I#</USR><Declaration>void test_cmd_param_1(int x1)</Declaration></Function>]
  194. // CHECK-NEXT: CommentAST=[
  195. // CHECK-NEXT: (CXComment_FullComment
  196. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  197. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  198. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[] ParamIndex=Invalid
  199. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace)))]
  200. /// \param x1 Aaa.
  201. void test_cmd_param_2(int x1);
  202. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_2</Name><USR>c:@F@test_cmd_param_2#I#</USR><Declaration>void test_cmd_param_2(int x1)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
  203. // CHECK-NEXT: CommentAST=[
  204. // CHECK-NEXT: (CXComment_FullComment
  205. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  206. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  207. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
  208. // CHECK-NEXT: (CXComment_Paragraph
  209. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  210. /// \param zzz Aaa.
  211. void test_cmd_param_3(int x1);
  212. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_3:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_3</Name><USR>c:@F@test_cmd_param_3#I#</USR><Declaration>void test_cmd_param_3(int x1)</Declaration><Parameters><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
  213. // CHECK-NEXT: CommentAST=[
  214. // CHECK-NEXT: (CXComment_FullComment
  215. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  216. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  217. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
  218. // CHECK-NEXT: (CXComment_Paragraph
  219. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  220. /// \param x2 Bbb.
  221. /// \param x1 Aaa.
  222. void test_cmd_param_4(int x1, int x2);
  223. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_4:{{.*}} 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>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_4</Name><USR>c:@F@test_cmd_param_4#I#I#</USR><Declaration>void test_cmd_param_4(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter></Parameters></Function>]
  224. // CHECK-NEXT: CommentAST=[
  225. // CHECK-NEXT: (CXComment_FullComment
  226. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  227. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  228. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
  229. // CHECK-NEXT: (CXComment_Paragraph
  230. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
  231. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  232. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
  233. // CHECK-NEXT: (CXComment_Paragraph
  234. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  235. /// \param x2 Bbb.
  236. /// \param zzz Aaa.
  237. /// \param x1 Aaa.
  238. void test_cmd_param_5(int x1, int x2);
  239. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_5:{{.*}} 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>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_5</Name><USR>c:@F@test_cmd_param_5#I#I#</USR><Declaration>void test_cmd_param_5(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter></Parameters></Function>]
  240. // CHECK-NEXT: CommentAST=[
  241. // CHECK-NEXT: (CXComment_FullComment
  242. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  243. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  244. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
  245. // CHECK-NEXT: (CXComment_Paragraph
  246. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
  247. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  248. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[zzz] ParamIndex=Invalid
  249. // CHECK-NEXT: (CXComment_Paragraph
  250. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  251. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  252. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
  253. // CHECK-NEXT: (CXComment_Paragraph
  254. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
  255. /// \param x1 Aaa.
  256. /// \param ... Bbb.
  257. void test_cmd_param_6(int x1, ...);
  258. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_6:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa. </dd><dt class="param-name-index-vararg">...</dt><dd class="param-descr-index-vararg"> Bbb.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_6</Name><USR>c:@F@test_cmd_param_6#I.#</USR><Declaration>void test_cmd_param_6(int x1, ...)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter><Parameter><Name>...</Name><IsVarArg /><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb.</Para></Discussion></Parameter></Parameters></Function>]
  259. // CHECK-NEXT: CommentAST=[
  260. // CHECK-NEXT: (CXComment_FullComment
  261. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  262. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  263. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
  264. // CHECK-NEXT: (CXComment_Paragraph
  265. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  266. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  267. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[...] ParamIndex=4294967295
  268. // CHECK-NEXT: (CXComment_Paragraph
  269. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  270. //===---
  271. // Tests for \tparam.
  272. //===---
  273. /// \tparam
  274. /// \param aaa Blah blah
  275. template<typename T>
  276. void test_cmd_tparam_1(T aaa);
  277. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_1:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_1</Name><USR>c:@FT@&gt;1#Ttest_cmd_tparam_1#t0.0#v#</USR><Declaration>template &lt;typename T&gt; void test_cmd_tparam_1(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
  278. // CHECK-NEXT: CommentAST=[
  279. // CHECK-NEXT: (CXComment_FullComment
  280. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  281. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  282. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[] ParamPosition=Invalid
  283. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  284. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  285. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[aaa] ParamIndex=0
  286. // CHECK-NEXT: (CXComment_Paragraph
  287. // CHECK-NEXT: (CXComment_Text Text=[ Blah blah]))))]
  288. /// \tparam T
  289. /// \param aaa Blah blah
  290. template<typename T>
  291. void test_cmd_tparam_2(T aaa);
  292. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_2</Name><USR>c:@FT@&gt;1#Ttest_cmd_tparam_2#t0.0#v#</USR><Declaration>template &lt;typename T&gt; void test_cmd_tparam_2(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
  293. // CHECK-NEXT: CommentAST=[
  294. // CHECK-NEXT: (CXComment_FullComment
  295. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  296. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  297. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T] ParamPosition={0}
  298. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  299. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  300. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[aaa] ParamIndex=0
  301. // CHECK-NEXT: (CXComment_Paragraph
  302. // CHECK-NEXT: (CXComment_Text Text=[ Blah blah]))))]
  303. /// \tparam T2 Bbb
  304. /// \tparam T1 Aaa
  305. template<typename T1, typename T2>
  306. void test_cmd_tparam_3(T1 aaa, T2 bbb);
  307. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_3:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_3</Name><USR>c:@FT@&gt;2#T#Ttest_cmd_tparam_3#t0.0#t0.1#v#</USR><Declaration>template &lt;typename T1, typename T2&gt; void test_cmd_tparam_3(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
  308. // CHECK-NEXT: CommentAST=[
  309. // CHECK-NEXT: (CXComment_FullComment
  310. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  311. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  312. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T2] ParamPosition={1}
  313. // CHECK-NEXT: (CXComment_Paragraph
  314. // CHECK-NEXT: (CXComment_Text Text=[ Bbb] HasTrailingNewline)
  315. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  316. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T1] ParamPosition={0}
  317. // CHECK-NEXT: (CXComment_Paragraph
  318. // CHECK-NEXT: (CXComment_Text Text=[ Aaa]))))]
  319. /// \tparam T2 Bbb
  320. /// \tparam U Zzz
  321. /// \tparam V Ccc
  322. /// \tparam T1 Aaa
  323. template<typename T1, typename T2, int V>
  324. void test_cmd_tparam_4(T1 aaa, T2 bbb);
  325. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_4:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd><dt class="tparam-name-index-2">V</dt><dd class="tparam-descr-index-2"> Ccc </dd><dt class="tparam-name-index-invalid">U</dt><dd class="tparam-descr-index-invalid"> Zzz </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_4</Name><USR>c:@FT@&gt;3#T#T#NItest_cmd_tparam_4#t0.0#t0.1#v#</USR><Declaration>template &lt;typename T1, typename T2, int V&gt;\nvoid test_cmd_tparam_4(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>V</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>U</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
  326. // CHECK-NEXT: CommentAST=[
  327. // CHECK-NEXT: (CXComment_FullComment
  328. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  329. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  330. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T2] ParamPosition={1}
  331. // CHECK-NEXT: (CXComment_Paragraph
  332. // CHECK-NEXT: (CXComment_Text Text=[ Bbb] HasTrailingNewline)
  333. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  334. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[U] ParamPosition=Invalid
  335. // CHECK-NEXT: (CXComment_Paragraph
  336. // CHECK-NEXT: (CXComment_Text Text=[ Zzz] HasTrailingNewline)
  337. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  338. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[V] ParamPosition={2}
  339. // CHECK-NEXT: (CXComment_Paragraph
  340. // CHECK-NEXT: (CXComment_Text Text=[ Ccc] HasTrailingNewline)
  341. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  342. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T1] ParamPosition={0}
  343. // CHECK-NEXT: (CXComment_Paragraph
  344. // CHECK-NEXT: (CXComment_Text Text=[ Aaa]))))]
  345. /// \tparam TTT Ddd
  346. /// \tparam C Ccc
  347. /// \tparam T Aaa
  348. /// \tparam TT Bbb
  349. template<template<template<typename T> class TT, class C> class TTT>
  350. void test_cmd_tparam_5();
  351. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_5:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">TTT</dt><dd class="tparam-descr-index-0"> Ddd </dd><dt class="tparam-name-index-other">C</dt><dd class="tparam-descr-index-other"> Ccc </dd><dt class="tparam-name-index-other">T</dt><dd class="tparam-descr-index-other"> Aaa </dd><dt class="tparam-name-index-other">TT</dt><dd class="tparam-descr-index-other"> Bbb</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_5</Name><USR>c:@FT@&gt;1#t&gt;2#t&gt;1#T#Ttest_cmd_tparam_5#v#</USR><Declaration>template &lt;template &lt;template &lt;typename T&gt; class TT, class C&gt; class TTT&gt;\nvoid test_cmd_tparam_5()</Declaration><TemplateParameters><Parameter><Name>TTT</Name><Index>0</Index><Discussion><Para> Ddd </Para></Discussion></Parameter><Parameter><Name>C</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>T</Name><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>TT</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
  352. // CHECK-NEXT: CommentAST=[
  353. // CHECK-NEXT: (CXComment_FullComment
  354. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  355. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  356. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[TTT] ParamPosition={0}
  357. // CHECK-NEXT: (CXComment_Paragraph
  358. // CHECK-NEXT: (CXComment_Text Text=[ Ddd] HasTrailingNewline)
  359. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  360. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[C] ParamPosition={0, 1}
  361. // CHECK-NEXT: (CXComment_Paragraph
  362. // CHECK-NEXT: (CXComment_Text Text=[ Ccc] HasTrailingNewline)
  363. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  364. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[T] ParamPosition={0, 0, 0}
  365. // CHECK-NEXT: (CXComment_Paragraph
  366. // CHECK-NEXT: (CXComment_Text Text=[ Aaa] HasTrailingNewline)
  367. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  368. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[TT] ParamPosition={0, 0}
  369. // CHECK-NEXT: (CXComment_Paragraph
  370. // CHECK-NEXT: (CXComment_Text Text=[ Bbb]))))]
  371. //===---
  372. // Tests for interaction between commands.
  373. //===---
  374. /// \brief Aaa.
  375. ///
  376. /// Bbb.
  377. ///
  378. /// \param x2 Ddd.
  379. /// \param x1 Ccc.
  380. /// \returns Eee.
  381. void test_full_comment_1(int x1, int x2);
  382. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_full_comment_1:{{.*}} 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><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Eee.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_full_comment_1</Name><USR>c:@F@test_full_comment_1#I#I#</USR><Declaration>void test_full_comment_1(int x1, int x2)</Declaration><Abstract><Para> Aaa.</Para></Abstract><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ccc. </Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ddd. </Para></Discussion></Parameter></Parameters><ResultDiscussion><Para> Eee.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
  383. // CHECK-NEXT: CommentAST=[
  384. // CHECK-NEXT: (CXComment_FullComment
  385. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  386. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  387. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[brief]
  388. // CHECK-NEXT: (CXComment_Paragraph
  389. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))
  390. // CHECK-NEXT: (CXComment_Paragraph
  391. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))
  392. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  393. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  394. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x2] ParamIndex=1
  395. // CHECK-NEXT: (CXComment_Paragraph
  396. // CHECK-NEXT: (CXComment_Text Text=[ Ddd.] HasTrailingNewline)
  397. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  398. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[x1] ParamIndex=0
  399. // CHECK-NEXT: (CXComment_Paragraph
  400. // CHECK-NEXT: (CXComment_Text Text=[ Ccc.] HasTrailingNewline)
  401. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  402. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[returns]
  403. // CHECK-NEXT: (CXComment_Paragraph
  404. // CHECK-NEXT: (CXComment_Text Text=[ Eee.]))))]
  405. //===---
  406. // Misc tests.
  407. //===---
  408. /// <br><a href="http://example.com/">Aaa</a>
  409. void comment_to_html_conversion_24();
  410. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_24:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <br><a href="http://example.com/">Aaa</a></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_24</Name><USR>c:@F@comment_to_html_conversion_24#</USR><Declaration>void comment_to_html_conversion_24()</Declaration><Abstract><Para> <rawHTML><![CDATA[<br>]]></rawHTML><rawHTML><![CDATA[<a href="http://example.com/">]]></rawHTML>Aaa<rawHTML>&lt;/a&gt;</rawHTML></Para></Abstract></Function>]
  411. // CHECK-NEXT: CommentAST=[
  412. // CHECK-NEXT: (CXComment_FullComment
  413. // CHECK-NEXT: (CXComment_Paragraph
  414. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  415. // CHECK-NEXT: (CXComment_HTMLStartTag Name=[br])
  416. // CHECK-NEXT: (CXComment_HTMLStartTag Name=[a] Attrs: href=http://example.com/)
  417. // CHECK-NEXT: (CXComment_Text Text=[Aaa])
  418. // CHECK-NEXT: (CXComment_HTMLEndTag Name=[a])))]
  419. /// \verbatim
  420. /// <a href="http://example.com/">Aaa</a>
  421. /// <a href='http://example.com/'>Aaa</a>
  422. /// \endverbatim
  423. void comment_to_html_conversion_25();
  424. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_25:{{.*}} 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>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_25</Name><USR>c:@F@comment_to_html_conversion_25#</USR><Declaration>void comment_to_html_conversion_25()</Declaration><Discussion><Verbatim xml:space="preserve" kind="verbatim"> &lt;a href=&quot;http://example.com/&quot;&gt;Aaa&lt;/a&gt;\n &lt;a href=&apos;http://example.com/&apos;&gt;Aaa&lt;/a&gt;</Verbatim></Discussion></Function>]
  425. // CHECK-NEXT: CommentAST=[
  426. // CHECK-NEXT: (CXComment_FullComment
  427. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  428. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  429. // CHECK-NEXT: (CXComment_VerbatimBlockCommand CommandName=[verbatim]
  430. // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ <a href="http://example.com/">Aaa</a>])
  431. // CHECK-NEXT: (CXComment_VerbatimBlockLine Text=[ <a href='http://example.com/'>Aaa</a>])))]
  432. /// \def foo_def
  433. /// \fn foo_fn
  434. /// \namespace foo_namespace
  435. /// \overload foo_overload
  436. /// \property foo_property
  437. /// \typedef foo_typedef
  438. /// \var foo_var
  439. /// \function foo_function
  440. /// \class foo_class
  441. /// \method foo_method
  442. /// \interface foo_interface
  443. /// Blah blah.
  444. void comment_to_html_conversion_26();
  445. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_26:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Blah blah.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_26</Name><USR>c:@F@comment_to_html_conversion_26#</USR><Declaration>void comment_to_html_conversion_26()</Declaration><Abstract><Para> Blah blah.</Para></Abstract></Function>]
  446. // CHECK-NEXT: CommentAST=[
  447. // CHECK-NEXT: (CXComment_FullComment
  448. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  449. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  450. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_def])
  451. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  452. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  453. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_fn])
  454. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  455. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  456. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_namespace])
  457. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  458. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  459. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_overload])
  460. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  461. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  462. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_property])
  463. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  464. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  465. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_typedef])
  466. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  467. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  468. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_var])
  469. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  470. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  471. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_function])
  472. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  473. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  474. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_class])
  475. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  476. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  477. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_method])
  478. // CHECK-NEXT: (CXComment_Paragraph IsWhitespace
  479. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  480. // CHECK-NEXT: (CXComment_VerbatimLine Text=[ foo_interface])
  481. // CHECK-NEXT: (CXComment_Paragraph
  482. // CHECK-NEXT: (CXComment_Text Text=[ Blah blah.])))]
  483. /// \unknown
  484. void comment_to_html_conversion_27();
  485. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_27:{{.*}} FullCommentAsHTML=[<p class="para-brief"> </p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_27</Name><USR>c:@F@comment_to_html_conversion_27#</USR><Declaration>void comment_to_html_conversion_27()</Declaration><Abstract><Para> </Para></Abstract></Function>]
  486. // CHECK-NEXT: CommentAST=[
  487. // CHECK-NEXT: (CXComment_FullComment
  488. // CHECK-NEXT: (CXComment_Paragraph
  489. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  490. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[unknown] RenderNormal)))]
  491. /// \b Aaa
  492. void comment_to_html_conversion_28();
  493. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_28:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <b>Aaa</b></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_28</Name><USR>c:@F@comment_to_html_conversion_28#</USR><Declaration>void comment_to_html_conversion_28()</Declaration><Abstract><Para> <bold>Aaa</bold></Para></Abstract></Function>]
  494. // CHECK-NEXT: CommentAST=[
  495. // CHECK-NEXT: (CXComment_FullComment
  496. // CHECK-NEXT: (CXComment_Paragraph
  497. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  498. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[b] RenderBold Arg[0]=Aaa)))]
  499. /// \c Aaa \p Bbb
  500. void comment_to_html_conversion_29();
  501. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_29:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <tt>Aaa</tt> <tt>Bbb</tt></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_29</Name><USR>c:@F@comment_to_html_conversion_29#</USR><Declaration>void comment_to_html_conversion_29()</Declaration><Abstract><Para> <monospaced>Aaa</monospaced> <monospaced>Bbb</monospaced></Para></Abstract></Function>]
  502. // CHECK-NEXT: CommentAST=[
  503. // CHECK-NEXT: (CXComment_FullComment
  504. // CHECK-NEXT: (CXComment_Paragraph
  505. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  506. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[c] RenderMonospaced Arg[0]=Aaa)
  507. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  508. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[p] RenderMonospaced Arg[0]=Bbb)))]
  509. /// \a Aaa \e Bbb \em Ccc
  510. void comment_to_html_conversion_30();
  511. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_30:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>Aaa</em> <em>Bbb</em> <em>Ccc</em></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_30</Name><USR>c:@F@comment_to_html_conversion_30#</USR><Declaration>void comment_to_html_conversion_30()</Declaration><Abstract><Para> <emphasized>Aaa</emphasized> <emphasized>Bbb</emphasized> <emphasized>Ccc</emphasized></Para></Abstract></Function>]
  512. // CHECK-NEXT: CommentAST=[
  513. // CHECK-NEXT: (CXComment_FullComment
  514. // CHECK-NEXT: (CXComment_Paragraph
  515. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  516. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=Aaa)
  517. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  518. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=Bbb)
  519. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  520. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=Ccc)))]
  521. /// \a 1<2 \e 3<4 \em 5<6 \param 7<8 aaa \tparam 9<10 bbb
  522. void comment_to_html_conversion_31();
  523. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_31:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>1&lt;2</em> <em>3&lt;4</em> <em>5&lt;6</em> </p><dl><dt class="tparam-name-index-invalid">9&lt;10</dt><dd class="tparam-descr-index-invalid"> bbb</dd></dl><dl><dt class="param-name-index-invalid">7&lt;8</dt><dd class="param-descr-index-invalid"> aaa </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_31</Name><USR>c:@F@comment_to_html_conversion_31#</USR><Declaration>void comment_to_html_conversion_31()</Declaration><Abstract><Para> <emphasized>1&lt;2</emphasized> <emphasized>3&lt;4</emphasized> <emphasized>5&lt;6</emphasized> </Para></Abstract><TemplateParameters><Parameter><Name>9&lt;10</Name><Discussion><Para> bbb</Para></Discussion></Parameter></TemplateParameters><Parameters><Parameter><Name>7&lt;8</Name><Direction isExplicit="0">in</Direction><Discussion><Para> aaa </Para></Discussion></Parameter></Parameters></Function>]
  524. // CHECK-NEXT: CommentAST=[
  525. // CHECK-NEXT: (CXComment_FullComment
  526. // CHECK-NEXT: (CXComment_Paragraph
  527. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  528. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=1<2)
  529. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  530. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=3<4)
  531. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  532. // CHECK-NEXT: (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=5<6)
  533. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  534. // CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[7<8] ParamIndex=Invalid
  535. // CHECK-NEXT: (CXComment_Paragraph
  536. // CHECK-NEXT: (CXComment_Text Text=[ aaa ])))
  537. // CHECK-NEXT: (CXComment_TParamCommand ParamName=[9<10] ParamPosition=Invalid
  538. // CHECK-NEXT: (CXComment_Paragraph
  539. // CHECK-NEXT: (CXComment_Text Text=[ bbb]))))]
  540. /// \\ \@ \& \$ \# \< \> \% \" \. \::
  541. void comment_to_html_conversion_32();
  542. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_32:{{.*}} FullCommentAsHTML=[<p class="para-brief"> \ @ &amp; $ # &lt; &gt; % &quot; . ::</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_32</Name><USR>c:@F@comment_to_html_conversion_32#</USR><Declaration>void comment_to_html_conversion_32()</Declaration><Abstract><Para> \ @ &amp; $ # &lt; &gt; % &quot; . ::</Para></Abstract></Function>]
  543. // CHECK-NEXT: CommentAST=[
  544. // CHECK-NEXT: (CXComment_FullComment
  545. // CHECK-NEXT: (CXComment_Paragraph
  546. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  547. // CHECK-NEXT: (CXComment_Text Text=[\])
  548. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  549. // CHECK-NEXT: (CXComment_Text Text=[@])
  550. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  551. // CHECK-NEXT: (CXComment_Text Text=[&])
  552. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  553. // CHECK-NEXT: (CXComment_Text Text=[$])
  554. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  555. // CHECK-NEXT: (CXComment_Text Text=[#])
  556. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  557. // CHECK-NEXT: (CXComment_Text Text=[<])
  558. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  559. // CHECK-NEXT: (CXComment_Text Text=[>])
  560. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  561. // CHECK-NEXT: (CXComment_Text Text=[%])
  562. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  563. // CHECK-NEXT: (CXComment_Text Text=["])
  564. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  565. // CHECK-NEXT: (CXComment_Text Text=[.])
  566. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  567. // CHECK-NEXT: (CXComment_Text Text=[::])))]
  568. /// &amp; &lt; &gt; &quot; &apos; &#109;&#101;&#111;&#119; &#x6d;&#x65;&#x6F;&#X77;
  569. void comment_to_html_conversion_33();
  570. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_33:{{.*}} FullCommentAsHTML=[<p class="para-brief"> &amp; &lt; &gt; &quot; &#39; meow meow</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_33</Name><USR>c:@F@comment_to_html_conversion_33#</USR><Declaration>void comment_to_html_conversion_33()</Declaration><Abstract><Para> &amp; &lt; &gt; &quot; &apos; meow meow</Para></Abstract></Function>]
  571. // CHECK-NEXT: CommentAST=[
  572. // CHECK-NEXT: (CXComment_FullComment
  573. // CHECK-NEXT: (CXComment_Paragraph
  574. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  575. // CHECK-NEXT: (CXComment_Text Text=[&])
  576. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  577. // CHECK-NEXT: (CXComment_Text Text=[<])
  578. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  579. // CHECK-NEXT: (CXComment_Text Text=[>])
  580. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  581. // CHECK-NEXT: (CXComment_Text Text=["])
  582. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  583. // CHECK-NEXT: (CXComment_Text Text=['])
  584. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  585. // CHECK-NEXT: (CXComment_Text Text=[m])
  586. // CHECK-NEXT: (CXComment_Text Text=[e])
  587. // CHECK-NEXT: (CXComment_Text Text=[o])
  588. // CHECK-NEXT: (CXComment_Text Text=[w])
  589. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  590. // CHECK-NEXT: (CXComment_Text Text=[m])
  591. // CHECK-NEXT: (CXComment_Text Text=[e])
  592. // CHECK-NEXT: (CXComment_Text Text=[o])
  593. // CHECK-NEXT: (CXComment_Text Text=[w])))]
  594. /// <em>0&lt;i</em>
  595. void comment_to_html_conversion_34();
  596. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_34:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <em>0&lt;i</em></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_34</Name><USR>c:@F@comment_to_html_conversion_34#</USR><Declaration>void comment_to_html_conversion_34()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>0&lt;i<rawHTML>&lt;/em&gt;</rawHTML></Para></Abstract></Function>]
  597. // CHECK-NEXT: CommentAST=[
  598. // CHECK-NEXT: (CXComment_FullComment
  599. // CHECK-NEXT: (CXComment_Paragraph
  600. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  601. // CHECK-NEXT: (CXComment_HTMLStartTag Name=[em])
  602. // CHECK-NEXT: (CXComment_Text Text=[0])
  603. // CHECK-NEXT: (CXComment_Text Text=[<])
  604. // CHECK-NEXT: (CXComment_Text Text=[i])
  605. // CHECK-NEXT: (CXComment_HTMLEndTag Name=[em])))]
  606. // rdar://12392215
  607. /// &copy; the copyright symbol
  608. /// &trade; the trade mark symbol
  609. /// &reg; the registered trade mark symbol
  610. /// &nbsp; a non-breakable space.
  611. /// &Delta; Greek letter Delta Δ.
  612. /// &Gamma; Greek letter Gamma Γ.
  613. void comment_to_html_conversion_35();
  614. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_35:{{.*}} FullCommentAsHTML=[<p class="para-brief"> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_35</Name><USR>c:@F@comment_to_html_conversion_35#</USR><Declaration>void comment_to_html_conversion_35()</Declaration><Abstract><Para> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</Para></Abstract></Function>]
  615. // CHECK-NEXT: CommentAST=[
  616. // CHECK-NEXT: (CXComment_FullComment
  617. // CHECK-NEXT: (CXComment_Paragraph
  618. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  619. // CHECK-NEXT: (CXComment_Text Text=[©])
  620. // CHECK-NEXT: (CXComment_Text Text=[ the copyright symbol] HasTrailingNewline)
  621. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  622. // CHECK-NEXT: (CXComment_Text Text=[™])
  623. // CHECK-NEXT: (CXComment_Text Text=[ the trade mark symbol] HasTrailingNewline)
  624. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  625. // CHECK-NEXT: (CXComment_Text Text=[®])
  626. // CHECK-NEXT: (CXComment_Text Text=[ the registered trade mark symbol] HasTrailingNewline)
  627. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  628. // CHECK-NEXT: (CXComment_Text Text=[ ])
  629. // CHECK-NEXT: (CXComment_Text Text=[ a non-breakable space.] HasTrailingNewline)
  630. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  631. // CHECK-NEXT: (CXComment_Text Text=[Δ])
  632. // CHECK-NEXT: (CXComment_Text Text=[ Greek letter Delta Δ.] HasTrailingNewline)
  633. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  634. // CHECK-NEXT: (CXComment_Text Text=[Γ])
  635. // CHECK-NEXT: (CXComment_Text Text=[ Greek letter Gamma Γ.])))]
  636. /// <h1 id="]]>">Aaa</h1>
  637. void comment_to_html_conversion_36();
  638. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_36:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <h1 id="]]>">Aaa</h1></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_36</Name><USR>c:@F@comment_to_html_conversion_36#</USR><Declaration>void comment_to_html_conversion_36()</Declaration><Abstract><Para> <rawHTML><![CDATA[<h1 id="]]]]><![CDATA[>">]]></rawHTML>Aaa<rawHTML>&lt;/h1&gt;</rawHTML></Para></Abstract></Function>]
  639. // CHECK-NEXT: CommentAST=[
  640. // CHECK-NEXT: (CXComment_FullComment
  641. // CHECK-NEXT: (CXComment_Paragraph
  642. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
  643. // CHECK-NEXT: (CXComment_HTMLStartTag Name=[h1] Attrs: id=]]>)
  644. // CHECK-NEXT: (CXComment_Text Text=[Aaa])
  645. // CHECK-NEXT: (CXComment_HTMLEndTag Name=[h1])))]
  646. /// Aaa.
  647. class comment_to_xml_conversion_01 {
  648. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>comment_to_xml_conversion_01</Name><USR>c:@S@comment_to_xml_conversion_01</USR><Declaration>class comment_to_xml_conversion_01 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
  649. /// \param aaa Blah blah.
  650. comment_to_xml_conversion_01(int aaa);
  651. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConstructor=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>comment_to_xml_conversion_01</Name><USR>c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_01#I#</USR><Declaration>comment_to_xml_conversion_01(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
  652. /// Aaa.
  653. ~comment_to_xml_conversion_01();
  654. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>~comment_to_xml_conversion_01</Name><USR>c:@S@comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#</USR><Declaration>~comment_to_xml_conversion_01()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  655. /// \param aaa Blah blah.
  656. int comment_to_xml_conversion_02(int aaa);
  657. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: CXXMethod=comment_to_xml_conversion_02:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_02</Name><USR>c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_02#I#</USR><Declaration>int comment_to_xml_conversion_02(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
  658. /// \param aaa Blah blah.
  659. static int comment_to_xml_conversion_03(int aaa);
  660. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: CXXMethod=comment_to_xml_conversion_03:{{.*}} FullCommentAsXML=[<Function isClassMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="14"><Name>comment_to_xml_conversion_03</Name><USR>c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_03#I#S</USR><Declaration>static int comment_to_xml_conversion_03(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
  661. /// Aaa.
  662. int comment_to_xml_conversion_04;
  663. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: FieldDecl=comment_to_xml_conversion_04:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_04</Name><USR>c:@S@comment_to_xml_conversion_01@FI@comment_to_xml_conversion_04</USR><Declaration>int comment_to_xml_conversion_04</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
  664. /// Aaa.
  665. static int comment_to_xml_conversion_05;
  666. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: VarDecl=comment_to_xml_conversion_05:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="14"><Name>comment_to_xml_conversion_05</Name><USR>c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_05</USR><Declaration>static int comment_to_xml_conversion_05</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
  667. /// \param aaa Blah blah.
  668. void operator()(int aaa);
  669. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:8: CXXMethod=operator():{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="8"><Name>operator()</Name><USR>c:@S@comment_to_xml_conversion_01@F@operator()#I#</USR><Declaration>void operator()(int aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah.</Para></Discussion></Parameter></Parameters></Function>]
  670. /// Aaa.
  671. operator bool();
  672. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator bool:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>operator bool</Name><USR>c:@S@comment_to_xml_conversion_01@F@operator bool#</USR><Declaration>operator bool()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  673. /// Aaa.
  674. typedef int comment_to_xml_conversion_06;
  675. // USR is line-dependent here, so filter it with a regexp.
  676. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-3]]:15: TypedefDecl=comment_to_xml_conversion_06:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-3]]" column="15"><Name>comment_to_xml_conversion_06</Name><USR>{{[^<]+}}</USR><Declaration>typedef int comment_to_xml_conversion_06</Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
  677. /// Aaa.
  678. using comment_to_xml_conversion_07 = int;
  679. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: TypeAliasDecl=comment_to_xml_conversion_07:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="9"><Name>comment_to_xml_conversion_07</Name><USR>c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_07</USR><Declaration>using comment_to_xml_conversion_07 = int</Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
  680. /// Aaa.
  681. template<typename T, typename U>
  682. class comment_to_xml_conversion_08 { };
  683. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: ClassTemplate=comment_to_xml_conversion_08:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="9"><Name>comment_to_xml_conversion_08</Name><USR>c:@S@comment_to_xml_conversion_01@ST&gt;2#T#T@comment_to_xml_conversion_08</USR><Declaration>template &lt;typename T, typename U&gt; class comment_to_xml_conversion_08 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
  684. /// Aaa.
  685. template<typename T>
  686. using comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int>;
  687. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: UnexposedDecl=comment_to_xml_conversion_09:{{.*}} FullCommentAsXML=[<Typedef file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>comment_to_xml_conversion_09</Name><USR>c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_09</USR><Declaration>template &lt;typename T&gt;\nusing comment_to_xml_conversion_09 = comment_to_xml_conversion_08&lt;T, int&gt;</Declaration><Abstract><Para> Aaa.</Para></Abstract></Typedef>]
  688. };
  689. /// Aaa.
  690. template<typename T, typename U>
  691. void comment_to_xml_conversion_10(T aaa, U bbb);
  692. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@FT@&gt;2#T#Tcomment_to_xml_conversion_10#t0.0#t0.1#v#</USR><Declaration>template &lt;typename T, typename U&gt;\nvoid comment_to_xml_conversion_10(T aaa, U bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  693. /// Aaa.
  694. template<>
  695. void comment_to_xml_conversion_10(int aaa, int bbb);
  696. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_xml_conversion_10:{{.*}} FullCommentAsXML=[<Function templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_xml_conversion_10</Name><USR>c:@F@comment_to_xml_conversion_10&lt;#I#I&gt;#I#I#</USR><Declaration>void comment_to_xml_conversion_10(int aaa, int bbb)</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
  697. /// Aaa.
  698. template<typename T, typename U>
  699. class comment_to_xml_conversion_11 { };
  700. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@ST&gt;2#T#T@comment_to_xml_conversion_11</USR><Declaration>template &lt;typename T, typename U&gt; class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
  701. /// Aaa.
  702. template<typename T>
  703. class comment_to_xml_conversion_11<T, int> { };
  704. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="partialSpecialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@SP&gt;1#T@comment_to_xml_conversion_11&gt;#t0.0#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
  705. /// Aaa.
  706. template<>
  707. class comment_to_xml_conversion_11<int, int> { };
  708. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[<Class templateKind="specialization" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="7"><Name>comment_to_xml_conversion_11</Name><USR>c:@S@comment_to_xml_conversion_11&gt;#I#I</USR><Declaration>class comment_to_xml_conversion_11 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Class>]
  709. /// Aaa.
  710. int comment_to_xml_conversion_12;
  711. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:5: VarDecl=comment_to_xml_conversion_12:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="5"><Name>comment_to_xml_conversion_12</Name><USR>c:@comment_to_xml_conversion_12</USR><Declaration>int comment_to_xml_conversion_12</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
  712. /// Aaa.
  713. namespace comment_to_xml_conversion_13 {
  714. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:11: Namespace=comment_to_xml_conversion_13:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="11"><Name>comment_to_xml_conversion_13</Name><USR>c:@N@comment_to_xml_conversion_13</USR><Declaration>namespace comment_to_xml_conversion_13 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
  715. /// Aaa.
  716. namespace comment_to_xml_conversion_14 {
  717. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:13: Namespace=comment_to_xml_conversion_14:{{.*}} FullCommentAsXML=[<Namespace file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="13"><Name>comment_to_xml_conversion_14</Name><USR>c:@N@comment_to_xml_conversion_13@N@comment_to_xml_conversion_14</USR><Declaration>namespace comment_to_xml_conversion_14 {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Namespace>]
  718. }
  719. }
  720. /// Aaa.
  721. enum comment_to_xml_conversion_15 {
  722. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: EnumDecl=comment_to_xml_conversion_15:{{.*}} FullCommentAsXML=[<Enum file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_15</Name><USR>c:@E@comment_to_xml_conversion_15</USR><Declaration>enum comment_to_xml_conversion_15{{( : int)?}} {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Enum>]
  723. /// Aaa.
  724. comment_to_xml_conversion_16
  725. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:3: EnumConstantDecl=comment_to_xml_conversion_16:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="3"><Name>comment_to_xml_conversion_16</Name><USR>c:@E@comment_to_xml_conversion_15@comment_to_xml_conversion_16</USR><Declaration>comment_to_xml_conversion_16</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
  726. };
  727. /// Aaa.
  728. enum class comment_to_xml_conversion_17 {
  729. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:12: EnumDecl=comment_to_xml_conversion_17:{{.*}} FullCommentAsXML=[<Enum file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="12"><Name>comment_to_xml_conversion_17</Name><USR>c:@E@comment_to_xml_conversion_17</USR><Declaration>enum class comment_to_xml_conversion_17 : int {}</Declaration><Abstract><Para> Aaa.</Para></Abstract></Enum>]
  730. /// Aaa.
  731. comment_to_xml_conversion_18
  732. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:3: EnumConstantDecl=comment_to_xml_conversion_18:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="3"><Name>comment_to_xml_conversion_18</Name><USR>c:@E@comment_to_xml_conversion_17@comment_to_xml_conversion_18</USR><Declaration>comment_to_xml_conversion_18</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
  733. };
  734. /// <a href="http://example.org/">
  735. void comment_to_xml_conversion_unsafe_html_01();
  736. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_01:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_01</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_01#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_01()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<a href="http://example.org/">]]></rawHTML></Para></Abstract></Function>]
  737. /// <a href="http://example.org/"><em>Aaa</em>
  738. void comment_to_xml_conversion_unsafe_html_02();
  739. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_02:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_02</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_02#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_02()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<a href="http://example.org/">]]></rawHTML><rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML>&lt;/em&gt;</rawHTML></Para></Abstract></Function>]
  740. /// <em>Aaa
  741. void comment_to_xml_conversion_unsafe_html_03();
  742. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_03:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_03</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_03#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_03()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<em>]]></rawHTML>Aaa</Para></Abstract></Function>]
  743. /// <em>Aaa</b></em>
  744. void comment_to_xml_conversion_unsafe_html_04();
  745. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_04:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_04</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_04#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_04()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML isMalformed="1">&lt;/b&gt;</rawHTML><rawHTML>&lt;/em&gt;</rawHTML></Para></Abstract></Function>]
  746. /// <em>Aaa</em></b>
  747. void comment_to_xml_conversion_unsafe_html_05();
  748. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_05:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_05</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_05#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_05()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML>&lt;/em&gt;</rawHTML><rawHTML isMalformed="1">&lt;/b&gt;</rawHTML></Para></Abstract></Function>]
  749. /// </table>
  750. void comment_to_xml_conversion_unsafe_html_06();
  751. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_06:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_06</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_06#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_06()</Declaration><Abstract><Para> <rawHTML isMalformed="1">&lt;/table&gt;</rawHTML></Para></Abstract></Function>]
  752. /// <div onclick="alert('meow');">Aaa</div>
  753. void comment_to_xml_conversion_unsafe_html_07();
  754. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_07:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_07</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_07#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_07()</Declaration><Abstract><Para> <rawHTML><![CDATA[<div onclick="alert('meow');">]]></rawHTML>Aaa<rawHTML>&lt;/div&gt;</rawHTML></Para></Abstract></Function>]
  755. //===---
  756. // Check that we attach comments from the base class to derived classes if they don't have a comment.
  757. // rdar://13647476
  758. //===---
  759. /// BaseToSuper1_Base
  760. class BaseToSuper1_Base {};
  761. class BaseToSuper1_Derived : public BaseToSuper1_Base {};
  762. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper1_Derived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper1_Base</Name><USR>c:@S@BaseToSuper1_Base</USR><Declaration>class BaseToSuper1_Derived : public BaseToSuper1_Base {}</Declaration><Abstract><Para> BaseToSuper1_Base</Para></Abstract></Class>]
  763. /// BaseToSuper2_Base
  764. class BaseToSuper2_Base {};
  765. /// BaseToSuper2_Derived
  766. class BaseToSuper2_Derived : public BaseToSuper2_Base {};
  767. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_Derived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper2_Derived</Name><USR>c:@S@BaseToSuper2_Derived</USR><Declaration>class BaseToSuper2_Derived : public BaseToSuper2_Base {}</Declaration><Abstract><Para> BaseToSuper2_Derived</Para></Abstract></Class>]
  768. class BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {};
  769. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper2_Derived</Name><USR>c:@S@BaseToSuper2_Derived</USR><Declaration>class BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {}</Declaration><Abstract><Para> BaseToSuper2_Derived</Para></Abstract></Class>]
  770. /// BaseToSuper3_Base
  771. class BaseToSuper3_Base {};
  772. class BaseToSuper3_DerivedA : public virtual BaseToSuper3_Base {};
  773. class BaseToSuper3_DerivedB : public virtual BaseToSuper3_Base {};
  774. class BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA, public BaseToSuper3_DerivedB {};
  775. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper3_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper3_Base</Name><USR>c:@S@BaseToSuper3_Base</USR><Declaration>class BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA,\n public BaseToSuper3_DerivedB {}</Declaration><Abstract><Para> BaseToSuper3_Base</Para></Abstract></Class>]
  776. // Check that we propagate comments only through public inheritance.
  777. /// BaseToSuper4_Base
  778. class BaseToSuper4_Base {};
  779. /// BaseToSuper4_DerivedA
  780. class BaseToSuper4_DerivedA : virtual BaseToSuper4_Base {};
  781. class BaseToSuper4_DerivedB : public virtual BaseToSuper4_Base {};
  782. class BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA, public BaseToSuper4_DerivedB {};
  783. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper4_MoreDerived:{{.*}} FullCommentAsXML=[<Class file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="7"><Name>BaseToSuper4_Base</Name><USR>c:@S@BaseToSuper4_Base</USR><Declaration>class BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA,\n public BaseToSuper4_DerivedB {}</Declaration><Abstract><Para> BaseToSuper4_Base</Para></Abstract></Class>]
  784. //===---
  785. // Check the representation of \todo in XML.
  786. //===---
  787. /// Aaa.
  788. /// \todo Bbb.
  789. void comment_to_xml_conversion_todo_1();
  790. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_1:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_1</Name><USR>c:@F@comment_to_xml_conversion_todo_1#</USR><Declaration>void comment_to_xml_conversion_todo_1()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para></Discussion></Function>]
  791. /// Aaa.
  792. /// \todo Bbb.
  793. ///
  794. /// Ccc.
  795. void comment_to_xml_conversion_todo_2();
  796. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_2:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_2</Name><USR>c:@F@comment_to_xml_conversion_todo_2#</USR><Declaration>void comment_to_xml_conversion_todo_2()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para><Para> Ccc.</Para></Discussion></Function>]
  797. /// Aaa.
  798. /// \todo Bbb.
  799. ///
  800. /// Ccc.
  801. /// \todo Ddd.
  802. void comment_to_xml_conversion_todo_3();
  803. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_3:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_3</Name><USR>c:@F@comment_to_xml_conversion_todo_3#</USR><Declaration>void comment_to_xml_conversion_todo_3()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb.</Para><Para> Ccc. </Para><Para kind="todo"> Ddd.</Para></Discussion></Function>]
  804. /// Aaa.
  805. /// \todo Bbb.
  806. /// \todo Ccc.
  807. void comment_to_xml_conversion_todo_4();
  808. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_4:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_todo_4</Name><USR>c:@F@comment_to_xml_conversion_todo_4#</USR><Declaration>void comment_to_xml_conversion_todo_4()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para kind="todo"> Bbb. </Para><Para kind="todo"> Ccc.</Para></Discussion></Function>]
  809. //===---
  810. // Test the representation of exception specifications in AST and XML.
  811. //===---
  812. /// Aaa.
  813. /// \throws Bbb.
  814. void comment_to_xml_conversion_exceptions_1();
  815. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_1:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_1</Name><USR>c:@F@comment_to_xml_conversion_exceptions_1#</USR><Declaration>void comment_to_xml_conversion_exceptions_1()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
  816. // CHECK-NEXT: CommentAST=[
  817. // CHECK-NEXT: (CXComment_FullComment
  818. // CHECK-NEXT: (CXComment_Paragraph
  819. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  820. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  821. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throws]
  822. // CHECK-NEXT: (CXComment_Paragraph
  823. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  824. /// Aaa.
  825. /// \throw Bbb.
  826. void comment_to_xml_conversion_exceptions_2();
  827. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_2:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_2</Name><USR>c:@F@comment_to_xml_conversion_exceptions_2#</USR><Declaration>void comment_to_xml_conversion_exceptions_2()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
  828. // CHECK-NEXT: CommentAST=[
  829. // CHECK-NEXT: (CXComment_FullComment
  830. // CHECK-NEXT: (CXComment_Paragraph
  831. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  832. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  833. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throw]
  834. // CHECK-NEXT: (CXComment_Paragraph
  835. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  836. /// Aaa.
  837. /// \exception Bbb.
  838. void comment_to_xml_conversion_exceptions_3();
  839. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_3:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_3</Name><USR>c:@F@comment_to_xml_conversion_exceptions_3#</USR><Declaration>void comment_to_xml_conversion_exceptions_3()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb.</Para></Exceptions></Function>]
  840. // CHECK-NEXT: CommentAST=[
  841. // CHECK-NEXT: (CXComment_FullComment
  842. // CHECK-NEXT: (CXComment_Paragraph
  843. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  844. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  845. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[exception]
  846. // CHECK-NEXT: (CXComment_Paragraph
  847. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
  848. /// Aaa.
  849. /// \throws Bbb.
  850. /// \throws Ccc.
  851. /// \throws Ddd.
  852. void comment_to_xml_conversion_exceptions_4();
  853. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_4:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_4</Name><USR>c:@F@comment_to_xml_conversion_exceptions_4#</USR><Declaration>void comment_to_xml_conversion_exceptions_4()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb. </Para><Para> Ccc. </Para><Para> Ddd.</Para></Exceptions></Function>]
  854. // CHECK-NEXT: CommentAST=[
  855. // CHECK-NEXT: (CXComment_FullComment
  856. // CHECK-NEXT: (CXComment_Paragraph
  857. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  858. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  859. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throws]
  860. // CHECK-NEXT: (CXComment_Paragraph
  861. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
  862. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  863. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throws]
  864. // CHECK-NEXT: (CXComment_Paragraph
  865. // CHECK-NEXT: (CXComment_Text Text=[ Ccc.] HasTrailingNewline)
  866. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  867. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throws]
  868. // CHECK-NEXT: (CXComment_Paragraph
  869. // CHECK-NEXT: (CXComment_Text Text=[ Ddd.]))))]
  870. /// Aaa.
  871. /// \throws Bbb.
  872. /// \throw Ccc.
  873. void comment_to_xml_conversion_exceptions_5();
  874. // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_exceptions_5:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_exceptions_5</Name><USR>c:@F@comment_to_xml_conversion_exceptions_5#</USR><Declaration>void comment_to_xml_conversion_exceptions_5()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Exceptions><Para> Bbb. </Para><Para> Ccc.</Para></Exceptions></Function>]
  875. // CHECK-NEXT: CommentAST=[
  876. // CHECK-NEXT: (CXComment_FullComment
  877. // CHECK-NEXT: (CXComment_Paragraph
  878. // CHECK-NEXT: (CXComment_Text Text=[ Aaa.] HasTrailingNewline)
  879. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
  880. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throws]
  881. // CHECK-NEXT: (CXComment_Paragraph
  882. // CHECK-NEXT: (CXComment_Text Text=[ Bbb.] HasTrailingNewline)
  883. // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
  884. // CHECK-NEXT: (CXComment_BlockCommand CommandName=[throw]
  885. // CHECK-NEXT: (CXComment_Paragraph
  886. // CHECK-NEXT: (CXComment_Text Text=[ Ccc.]))))]
  887. #endif