[cfe-commits] r163836 - in /cfe/trunk: include/clang/AST/CommentCommandTraits.h include/clang/AST/CommentCommands.td lib/AST/CommentSema.cpp test/Sema/warn-documentation.cpp utils/TableGen/ClangCommentCommandInfoEmitter.cpp

Dmitri Gribenko gribozavr at gmail.com
Fri Sep 14 07:15:13 PDT 2012


On Fri, Sep 14, 2012 at 12:42 AM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Sep 13, 2012, at 1:36 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
>> Author: gribozavr
>> Date: Thu Sep 13 15:36:01 2012
>> New Revision: 163836
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=163836&view=rev
>> Log:
>> Comment parsing: handle \deprecated command.  It is a block command, but it
>> should be fine to use it without further explanations in the attached
>> paragraph, so the warning about empty paragraph was turned off for it.
>
> When we see a "deprecated" comment tag for a declaration that does not have the "deprecated" attribute, should we add the deprecated attribute? Perhaps not, since we're parsing comments lazily.

I have a bad feeling in gerenal about adding attributes or otherwise
modifying C++ AST based on comments.

If we parse comments, when we hit \deprecated we could check for
presence of "deprecated" attribute and emit a warning if there is no
such attribute.  Of course, this warning should be under a separate
flag, something like -Wdocumentation-sync-deprecated.

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