[cfe-dev] Checking Comments With A Plugin

Sean Silva silvas at purdue.edu
Fri Oct 25 18:12:24 PDT 2013


You can get the comment attached to a Decl with
ASTContext::getRawCommentForDeclNoCache(),
but I'm not sure if we support something as powerful as, say, iterating
over every comment in the TU.

I've CC'd Dmitri who knows about clang's comment-accessing capabilities (he
is responsible for -Wdocumentation).

-- Sean Silva


On Fri, Oct 25, 2013 at 2:22 PM, Dan Campbell <dan.campbell at gmail.com>wrote:

> I'm working on a plugin to enforce a particular coding style. One of the
> rules requires that all comments follow a certain pattern. I've been having
> trouble finding a way to access all the comments in a translation unit, so
> that they can be checked.
>
> Is there a way to do this with the current plugin and static analysis
> tools, or are those only designed to look at actual code, and not comments?
>
> Thanks
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131025/1dab7336/attachment.html>


More information about the cfe-dev mailing list