[cfe-dev] Fwd: Running Clang-Tidy on a Large Project
Ahmad Nouralizadeh via cfe-dev
cfe-dev at lists.llvm.org
Thu Jul 19 11:34:21 PDT 2018
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
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/
SmallString<128> FixAbsoluteFilePath = Repl.getFilePath();
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.
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
On Thu, Jul 19, 2018 at 8:07 PM, Miklos Vajna via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> On Thu, Jul 19, 2018 at 03:55:16PM +0430, Ahmad Nouralizadeh via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> > Ignoring...Described file 'libavformat/apngdec.c' doesn't exist.
> > Ignoring......
> > These files are compiled using the Makefile located in the folder ffmpeg.
> See <https://clang.llvm.org/docs/JSONCompilationDatabase.html>, you
> either need to have absolute paths in your compile commands database or
> you need to have a matching directory key. Are those correct in your
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev