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

Douglas Gregor dgregor at apple.com
Mon Sep 10 13:00:31 PDT 2012


On Sep 10, 2012, at 10:43 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> 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.

Go for it!

>> +/// 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