[cfe-commits] r165953 - in /cfe/trunk: include/clang/AST/Comment.h lib/AST/Comment.cpp lib/AST/CommentDumper.cpp test/Index/overriding-ftemplate-comments.cpp test/Index/overriding-method-comments.mm tools/libclang/CXComment.cpp unittests/AST/Comm

Dmitri Gribenko gribozavr at gmail.com
Mon Oct 15 12:17:29 PDT 2012


On Mon, Oct 15, 2012 at 9:58 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> +// CHECK: FunctionTemplate=comment_to_html_conversion_17:14:6 RawComment=[/// \tparam\n/// \param AAA Blah blah] RawCommentRange=[11:1 - 12:25] 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="{{[^"]+}}overriding-ftemplate-comments.cpp" line="14" column="6"><Name>comment_to_html_conversion_17</Name><USR>c:@FT@>1#Tcomment_to_html_conversion_17#t0.0#</USR><Parameters><Parameter><Name>AAA</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>
> +
> +// CHECK: FunctionTemplate=comment_to_html_conversion_17:17:6 RawComment=[/// \tparam\n/// \param AAA Blah blah] RawCommentRange=[11:1 - 12:25] FullCommentAsHTML=[<dl><dt class="param-name-index-0">PPP</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}overriding-ftemplate-comments.cpp" line="14" column="6"><Name>comment_to_html_conversion_17</Name><USR>c:@FT@>1#Tcomment_to_html_conversion_17#t0.0#</USR><Parameters><Parameter><Name>PPP</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>

Shouldn't these refer to different source lines?

Also, a couple of general comments:
1. It would make sense to include only the XML part so that the test
is easier to read.

2. This kind of parameter renaming (both function and template
parameters) feels fragile.  Comment text could refer to parameter
names without special markup.  Even when \p is used, we don't
currently resolve parameter names in \p, so parameter names will stay
unchanged there.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-commits mailing list