[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

Douglas Gregor dgregor at apple.com
Fri Sep 14 08:11:05 PDT 2012


On Sep 14, 2012, at 7:15 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

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

Yeah, I agree.

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


Yes, this would be a fine way to help the user actually deprecate something in a meaningful way.

	- Doug



More information about the cfe-commits mailing list