<div dir="ltr">On Mon, May 20, 2013 at 7:53 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Mon, May 20, 2013 at 5:38 PM, David Röthlisberger <span dir="ltr"><<a href="mailto:david@rothlis.net" target="_blank">david@rothlis.net</a>></span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On 20 May 2013, at 18:19, Dimitri van Heesch wrote:<br>



> I'm pleased to announce that as of version 1.8.4 doxygen can optionally use libclang to<br>
> provide a more accurate source browsing experience, and better syntax highlighting,<br>
> cross referencing, and call graphs.<br>
<br>
<br>
</div>Great news! How does it work: How does doxygen get hold of the compiler<br>
flags that it needs to pass to clang?<br>
<br>
(This is the hardest thing I've found with any clang-based tooling.)<br></blockquote><div><br></div></div><div>We designed a whole system to solve this problem. Some documentation:</div><div><br></div><div>
<a href="http://clang.llvm.org/docs/JSONCompilationDatabase.html#json-compilation-database-format-specification" target="_blank">http://clang.llvm.org/docs/JSONCompilationDatabase.html#json-compilation-database-format-specification</a><br>


</div><div><a href="http://clang.llvm.org/docs/LibTooling.html#writing-a-standalone-tool" target="_blank">http://clang.llvm.org/docs/LibTooling.html#writing-a-standalone-tool</a><br></div><div><br></div><div>It would be best to re-use this work so that all of the tools use the same platform for communicating with build systems.</div>


</div></div></div>
</blockquote></div><br></div><div class="gmail_extra">And that context brings up the need for having a .h file mapping for the compilation database again. Daniel had the idea that we might get the 99% case by simply looking for files with the same base name to compile (and look whether the header is "obviously" included from there), but it still seems, um, dirty.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">The other way would be to somehow mark the include dump files that compilers produce to be input to the compilation database, so we can build up the reverse graph from there, but that would always require enough of a build (but that's already true for generated files).</div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>/me is still looking for good ideas here...</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>Cheers,</div><div class="gmail_extra" style>
/Manuel</div>
</div>