Looks good.<div><br></div><div>Nitpicks:</div><div><br></div><div><div>  +++ include/clang/Tooling/Tooling.h<span class="" style="white-space:pre">       </span>(working copy)</div></div><div>  ...</div><div>  +/// \brief Returns the absolute path of 'File', by prepending it with</div>
<div>  +/// the current directory if 'File' is not absolute.</div><div><br></div><div>Maybe use \c File instead of 'File'. But I am not sure what's better.</div><div><br></div><div><div>  +++ lib/Tooling/CompilationDatabase.cpp<span class="" style="white-space:pre">        </span>(working copy)</div>
</div><div>  ...</div><div><div>  +    if (CompilationDatabase *DB = loadFromDirectory(Directory, ErrorMessage))</div></div><div><br></div><div>I am not sure that the handling of the ErrorMessage makes much sense. If, e.g. we find a compilation database somewhere that fails to open, we overwrite this with a different error for the parent folder, right?</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 11:11 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Please take another look.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jul 10, 2012 at 9:40 AM, Daniel Jasper <<a href="mailto:djasper@google.com">djasper@google.com</a>> wrote:<br>
> I have tried using it by putting a symlink to compile_commands.json into my<br>
> llvm root and then use clang-check from within <llvm root>/tools/clang like<br>
> this:<br>
><br>
> $ clang-check lib/Tooling/CompilationDatabase.cpp<br>
> LLVM ERROR: Error while opening JSON database: No such file or directory<br>
><br>
> It works find if I supply the full path:<br>
> $ ~/clang/build/bin/clang-check $PWD/lib/Tooling/CompilationDatabase.cpp<br>
> Processing:<br>
> /home/djasper/clang/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp.<br>
><br>
> So, it does not go up the directory tree far enough, as the<br>
> Directory.empty() will be true before my symlink  is reached. Can this be<br>
> added? And can you add a test for such a case?<br>
><br>
>   +++ tools/clang/lib/Tooling/CompilationDatabase.cpp (working copy)<br>
>   ...<br>
>   +#include "llvm/Support/raw_ostream.h"<br>
><br>
> I don't think you need this new include.<br>
><br>
><br>
> On Mon, Jul 9, 2012 at 5:49 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>><br>
> wrote:<br>
>><br>
>> Adds the CompilationDatabase::autoDetectFromSource method for supporting<br>
>> build directory auto-detection for simple setups.<br>
>><br>
>> --<br>
>> Regards,<br>
>> Alexander<br>
>><br>
>> _______________________________________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
</div></div></blockquote></div><br></div>