[cfe-commits] [PATCH] TableGen'ize documentation command lists (and break binary compatibility of CXComment)

Dmitri Gribenko gribozavr at gmail.com
Mon Sep 10 10:43:53 PDT 2012


On Mon, Sep 10, 2012 at 6:29 PM, Douglas Gregor <dgregor at apple.com> wrote:
> ===================================================================
> --- include/clang-c/Index.h     (revision 163467)
> +++ include/clang-c/Index.h     (working copy)
> @@ -2040,7 +2040,8 @@
>   * \brief A comment AST node.
>   */
>  typedef struct {
> -  const void *Data;
> +  const void *ASTNode;
> +  void *ASTContext;
>  } CXComment;
>
> How about storing the CXTranslationUnit rather than the ASTContext?

Yes, it would be better.  Now
clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC)
doesn't need TU parameter anymore.  OK to remove?  Yes, this would be
a source-incompatible change, but the fix is trivial.

> +/// This class provides informaiton about commands that can be used
> +/// in comments.
>
> Typo "informaiton".

Done.

> +class CommandTraits {
> +public:
>
> How about making this noncopyable?

> This looks great, thanks!

Thank you for the review!

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