<div dir="ltr"><div dir="ltr" style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Hi Miklos,<div><br></div><div>The compilation database is correct. It is generated using Bear. It has correct directory (for the build directory) and file (for the file to be compiled) entries.</div><div>The tool works correctly with single file. I think because the absolute path is recreated in that case. It can be seen at "clang-extra-tools-source/<wbr>clang-tidy/ClangTidy.cpp:<wbr>line131" (clang-extra-tools-6.0.0):</div><div>...</div><div><p style="font-family:monospace,courier;font-size:10pt;white-space:pre-wrap"><span style="font-size:10pt">SmallString</span><span style="font-size:10pt;font-weight:bold"><</span><span style="font-size:10pt;color:rgb(0,128,128)">128</span><span style="font-size:10pt;font-weight:bold">></span><span style="font-size:10pt"> FixAbsoluteFilePath </span><span style="font-size:10pt;font-weight:bold">=</span><span style="font-size:10pt"> </span><span style="font-size:10pt;color:rgb(0,51,102)">Repl</span><span style="font-size:10pt;font-weight:bold">.</span><span style="font-size:10pt;color:rgb(128,0,0);font-style:italic">getFilePath</span><span style="font-size:10pt;font-weight:bold">();</span><br></p><p style="font-family:monospace,courier;font-size:10pt;white-space:pre-wrap"><span style="color:rgb(0,51,102);font-style:italic">Files</span><span style="font-weight:bold">.</span><span style="color:rgb(128,0,0);font-style:italic">makeAbsolutePath</span><span style="font-weight:bold">(</span>FixAbso<wbr>luteFilePath<span style="font-weight:bold">);</span></p>...</div><div>But the same operation is not performed when the information is exported to yaml, which is done when I run "run-clang-tidy" script with "-fix" option.</div><div>It seems that the problem with large projects is not new. There was a bug in clang-extra-tools-3.9.0 "run-clang-tidy" script which is revised in the current version. In that version, even clang-tidy was called with relative paths and therefore did not work for source files built from somewhere other than the root directory of the project. Looking forward to your suggestions!</div><div>Thanks!</div></div><br class="gmail-Apple-interchange-newline"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 19, 2018 at 8:07 PM, Miklos Vajna 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Thu, Jul 19, 2018 at 03:55:16PM +0430, Ahmad Nouralizadeh via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
> Ignoring...Described file 'libavformat/apngdec.c' doesn't exist.<br>
<span class="">> Ignoring......<br>
> <br>
> These files are compiled using the Makefile located in the folder ffmpeg.<br>
<br>
</span>See <<a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html" rel="noreferrer" target="_blank">https://clang.llvm.org/docs/<wbr>JSONCompilationDatabase.html</a>>, you<br>
either need to have absolute paths in your compile commands database or<br>
you need to have a matching directory key. Are those correct in your<br>
case?<br>
<br>
Regards,<br>
<br>
Miklos<br>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">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></div>