aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/ClangTidy.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-10-10 13:27:25 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-10-10 13:27:25 +0000
commit04d1afc9dda12d82b784a588fc60c642362da7b9 (patch)
treed9117b7b0b1e70ec813ad214d180c311644b4565 /clang-tidy/ClangTidy.cpp
parent58f7bb3f81b5522c68bdfe1d9f4c61cb36aae1c4 (diff)
Lift VFS from clang to llvm (NFC)
This patch moves the virtual file system form clang to llvm so it can be used by more projects. Concretely the patch: - Moves VirtualFileSystem.{h|cpp} from clang/Basic to llvm/Support. - Moves the corresponding unit test from clang to llvm. - Moves the vfs namespace from clang::vfs to llvm::vfs. - Formats the lines affected by this change, mostly this is the result of the added llvm namespace. RFC on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2018-October/126657.html Differential revision: https://reviews.llvm.org/D52783 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@344140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/ClangTidy.cpp')
-rw-r--r--clang-tidy/ClangTidy.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tidy/ClangTidy.cpp b/clang-tidy/ClangTidy.cpp
index 729371fb..9ab85b61 100644
--- a/clang-tidy/ClangTidy.cpp
+++ b/clang-tidy/ClangTidy.cpp
@@ -96,7 +96,7 @@ private:
class ErrorReporter {
public:
ErrorReporter(ClangTidyContext &Context, bool ApplyFixes,
- llvm::IntrusiveRefCntPtr<vfs::FileSystem> BaseFS)
+ llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS)
: Files(FileSystemOptions(), BaseFS), DiagOpts(new DiagnosticOptions()),
DiagPrinter(new TextDiagnosticPrinter(llvm::outs(), &*DiagOpts)),
Diags(IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs), &*DiagOpts,
@@ -503,7 +503,7 @@ getCheckOptions(const ClangTidyOptions &Options,
void runClangTidy(clang::tidy::ClangTidyContext &Context,
const CompilationDatabase &Compilations,
ArrayRef<std::string> InputFiles,
- llvm::IntrusiveRefCntPtr<vfs::FileSystem> BaseFS,
+ llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS,
bool EnableCheckProfile, llvm::StringRef StoreCheckProfile) {
ClangTool Tool(Compilations, InputFiles,
std::make_shared<PCHContainerOperations>(), BaseFS);
@@ -590,9 +590,9 @@ void runClangTidy(clang::tidy::ClangTidyContext &Context,
void handleErrors(ClangTidyContext &Context, bool Fix,
unsigned &WarningsAsErrorsCount,
- llvm::IntrusiveRefCntPtr<vfs::FileSystem> BaseFS) {
+ llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS) {
ErrorReporter Reporter(Context, Fix, BaseFS);
- vfs::FileSystem &FileSystem =
+ llvm::vfs::FileSystem &FileSystem =
*Reporter.getSourceManager().getFileManager().getVirtualFileSystem();
auto InitialWorkingDir = FileSystem.getCurrentWorkingDirectory();
if (!InitialWorkingDir)