<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 13, 2013 at 2:46 AM, David Röthlisberger <span dir="ltr"><<a href="mailto:david@rothlis.net" target="_blank">david@rothlis.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 13 Sep 2013, at 07:17, Sean Silva wrote:<br>
><br>
> On Thu, Sep 12, 2013 at 1:27 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br>
>> On Wed, Sep 11, 2013 at 3:51 AM, Juan Jose Lopez Villarejo <<a href="mailto:jj.lopezvillarejo@cern.ch">jj.lopezvillarejo@cern.ch</a>> wrote:<br>
>> > Hello, and thanks for the reply, Dimitri.<br>
>> ><br>
>> > You give me half of a solution: as you point out, we would need to attach comments to statements.<br>
>> ><br>
>> > Is there any developper that would be willing to do such an extension as you propose:<br>
>> > ASTContext::getRawCommentForStmtNoCache()<br>
>> > getCommentForStmt()<br>
>> ><br>
>> > Alternatively, how feasible you see that we could implement such an extension (novel to clang, physicist) and that it be maintained?!<br>
>><br>
>> Quite a few other developers have asked the same question (if Clang<br>
>> can attach comments to statements) during past year, but eventually<br>
>> did not send patches.  Nevertheless, this shows that community is<br>
>> interested in such functionality.<br>
>><br>
>> I would not call this hard to implement, but this is not a trivial<br>
>> change either: you will need to learn at least about Clang's AST,<br>
>> source location model (and how it interacts with the macros), lexer<br>
>> and parser architecture.  In addition to implementing the feature, you<br>
>> will also need to design a way to test these APIs *in clang tree*<br>
>> (without your tool) and write the tests.<br>
><br>
> I don't think that adding maintenance burden to clang for each new documentation format is sustainable anyway. Best to take advantage of modular/library-based design and keep these kinds of tools out of tree.<br>

<br>
</div></div>Hi Sean<br>
<br>
Could you please clarify what you mean? I don't think anyone is<br>
proposing to put Juan Jose's tool in-tree. The proposal is to add a<br>
mechanism for retrieving comments immediately preceding a statement --<br>
would that be something you'd accept in-tree?<br>
<br></blockquote><div><br></div><div>See my response to Dmitri.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Thanks,<br>
Dave.<br>
<br>
</blockquote></div><br></div></div>