[PATCH] D41535: Add -vfsoverlay option for Clang-Tidy

Vladimir Plyashkun via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 21 23:09:40 PST 2017


vladimir.plyashkun created this revision.
vladimir.plyashkun added reviewers: alexfh, benlangmuir.
vladimir.plyashkun added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

These changes introduce support for -vfsoverlay option in Clang-Tidy
The main reason for it:
In IDE integration we have two different pieces of source: editor and physical file.
File is placed in some project directory (let's call it "A")
We want to run clang-tidy exactly in this project directory "A",  in order to get all .clang-tidy files in parent directories along with correct resolution for all relative include paths.
But in IDE, saving mechanism perfoms periodically.
So, to perform analysis of actual text on the fly, we need to save document on every modification  (which is inefficient) or generate file in the temporary directory with actual text (it also leads to skipping .clang-tidy files and complicates include search paths resolution)
-vfsoverlay approach allows us to analyze source file in the project directory "A" but with actual data placed in another directory.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41535

Files:
  clang-tidy/ClangTidy.cpp
  clang-tidy/ClangTidyOptions.cpp
  clang-tidy/ClangTidyOptions.h
  clang-tidy/tool/ClangTidyMain.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41535.127985.patch
Type: text/x-patch
Size: 5521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171222/a05199a1/attachment-0001.bin>


More information about the cfe-commits mailing list