<div style="font-family: arial, helvetica, sans-serif"><font size="2"><div class="gmail_quote">On Tue, Jun 19, 2012 at 5:34 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:</div>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gribozavr<br>
Date: Tue Jun 19 19:34:58 2012<br>
New Revision: 158771<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=158771&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=158771&view=rev</a><br>
Log:<br>
Structured comment parsing, first step.<br></blockquote><div><br></div><div>I'm pretty excited to see this coming along, but...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
* Retain comments in the AST<br>
* Serialize/deserialize comments<br>
* Find comments attached to a certain Decl<br>
* Expose raw comment text and SourceRange via libclang<br>
<br>
Added:<br>
    cfe/trunk/include/clang/Comments/<br>
    cfe/trunk/include/clang/Comments/RawCommentList.h<br>
    cfe/trunk/lib/Comments/<br>
    cfe/trunk/lib/Comments/CMakeLists.txt<br>
    cfe/trunk/lib/Comments/Makefile<br>
    cfe/trunk/lib/Comments/RawCommentList.cpp<br></blockquote><div><br></div><div>Why are we introducing an entire new library just for one class with one source file?</div><div><br></div><div>This doesn't work at all -- this library depends on the AST library, and yet the AST library uses classes defined in this library. It's a bad layering violation, and it's not at all clear to me why it is needed.</div>
<div><br></div><div>I could see wanting the RawCommentList to be a library *below* the AST library, and if so I would expect it to be part of the Lex library with the preprocessor or the Basic library where the SourceManager itself is... I'm not really enthusiastic about growing an entire separate library just for this construct.</div>
<div><br></div><div><br></div><div>Anyways, the layering violation and circular dependency is a serious problem and was breaking some builds so I've folded this code into the AST library. You can sink it or move it around based on this discussion.</div>
</div></font></div>