[PATCH] D49890: Clang-Tidy Export Problem

Ahmad Nouralizadeh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 27 07:41:26 PDT 2018


TheAhmad added a comment.

The most comprehensive fix is to support all possible valid compilation databases. The current fix is the fastest one.

> Can you just make clang-tidy respect the directory value?

This is exactly what I did. I prepended the directory value to the file value and stored the result in the exported file.
There was also problem with merges to the same location. What I did is similar to the code for `inplace fix` (starting at `line 133` of `ClangTidy.cpp`), except that I have not added the code for merge conflicts. The ultimate fix requires adding a new function and moving the shared code there. Then `inplace fix` and `export` will use that function.



================
Comment at: ClangTidy.cpp:614
+  vfs::FileSystem &FileSystem = *Files->getVirtualFileSystem();
+  auto InitialWorkingDir = FileSystem.getCurrentWorkingDirectory();
+  if (!InitialWorkingDir)
----------------
Eugene.Zelenko wrote:
> Type is not obvious, so please don't use auto.
Hi, Eugene. Why line 352 uses auto?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49890





More information about the cfe-commits mailing list