diff options
Diffstat (limited to 'clang/unittests/Tooling')
| -rw-r--r-- | clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp | 3 | ||||
| -rw-r--r-- | clang/unittests/Tooling/Syntax/TokensTest.cpp | 1 | ||||
| -rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTestBase.cpp | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp b/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp index aa32bb3..4523af3 100644 --- a/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp +++ b/clang/unittests/Tooling/DependencyScanning/DependencyScannerTest.cpp @@ -49,6 +49,8 @@ private: std::vector<std::string> &Deps; }; +// FIXME: Use the regular Service/Worker/Collector APIs instead of +// reimplementing the action. class TestDependencyScanningAction : public tooling::ToolAction { public: TestDependencyScanningAction(std::vector<std::string> &Deps) : Deps(Deps) {} @@ -59,6 +61,7 @@ public: DiagnosticConsumer *DiagConsumer) override { CompilerInstance Compiler(std::move(Invocation), std::move(PCHContainerOps)); + Compiler.setVirtualFileSystem(FileMgr->getVirtualFileSystemPtr()); Compiler.setFileManager(FileMgr); Compiler.createDiagnostics(DiagConsumer, /*ShouldOwnClient=*/false); diff --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp index 6094177..47184cb 100644 --- a/clang/unittests/Tooling/Syntax/TokensTest.cpp +++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp @@ -134,6 +134,7 @@ public: FileName, llvm::MemoryBuffer::getMemBufferCopy(Code).release()); CompilerInstance Compiler(std::move(CI)); Compiler.setDiagnostics(Diags); + Compiler.setVirtualFileSystem(FS); Compiler.setFileManager(FileMgr); Compiler.setSourceManager(SourceMgr); diff --git a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp index 400a0d5..b2be64f 100644 --- a/clang/unittests/Tooling/Syntax/TreeTestBase.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTestBase.cpp @@ -153,6 +153,7 @@ SyntaxTreeTest::buildTree(StringRef Code, const TestClangConfig &ClangConfig) { FileName, llvm::MemoryBuffer::getMemBufferCopy(Code).release()); CompilerInstance Compiler(Invocation); Compiler.setDiagnostics(Diags); + Compiler.setVirtualFileSystem(FS); Compiler.setFileManager(FileMgr); Compiler.setSourceManager(SourceMgr); |
