[cfe-commits] [PATCH] Introduce diagnostics into comment parsing and semantic analysis

Dmitri Gribenko gribozavr at gmail.com
Thu Jul 12 16:42:42 PDT 2012


On Wed, Jul 11, 2012 at 5:01 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On Jul 11, 2012, at 14:39 , Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
> On Wed, Jul 11, 2012 at 9:38 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> +def warn_doc_html_open_close_mismatch : Warning<
> +  "HTML opening tag '%0' closed by '%1'">,
> +  InGroup<Doxygen>, DefaultIgnore;
>
> I'm worried about this warning. HTML is not XML (even though I personally
> prefer XML-style HTML), and so writing this is not at all uncommon:
>
> <ul>
>  <li>Item 1
>  <li>Item 2
> </ul>
>
>
> bool Sema::HTMLOpenTagNeedsClosing(StringRef Name)
> returns false for such tags.  It allows such tags to have closing
> tags, but suppresses the warning if closing tag is omitted. Added 'li'
> to the list, thanks!
>
>
> li is not nearly the only such tag. At the very least, 'p', 'dd', and 'dt'
> should be added as well, and perhaps the table pieces as well ('tr', 'td',
> 'th').
>
> There's also a sort of difference between tags that may be left unclosed,
> and tags that must be left unclosed (or self-closed, XML-style): 'hr', 'br',
> 'img'.

Done in r160149.

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