<div dir="ltr">Hi Alex,<div><br></div><div>Thanks for clarifying! That's how I ended up implementing it anyway.</div><div><br></div><div><br></div><div>Cheers,</div><div>Steve</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 October 2017 at 01:13, Alex L <span dir="ltr"><<a href="mailto:arphaman@gmail.com" target="_blank">arphaman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Stephen,<div><br></div><div>I believe that the comment nodes are stored in a side table, and are not visited by the RecursiveASTVisitor. Here's how the AST dumper gets them:</div><div><br></div><div><div> if (const FullComment *Comment =</div><div> D->getASTContext().<wbr>getLocalCommentForDeclUncached<wbr>(D))</div><div> dumpFullComment(Comment);</div></div><div><br></div><div>You get them in the same manner in your visitor in your VisitDecl function if you want to visit them.</div><div><br></div><div>I hope this helps,</div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 23 October 2017 at 18:38, Stephen Pegoraro via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">I'm working on a doc-comment tool using RecursiveASTVisitor however it doesn't seem to work with member functions named Visit[Comment Type]Comment. <div>E.g. VisitFullComment never gets called. When dumping the AST for the same source it clearly shows the comments nested under a FunctionDecl node.<div><br></div><div>Do I have to extract the comments directly from declaration nodes? Or can I extract them independently?</div></div></div>
<br></div></div>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>