diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2018-03-12 23:22:35 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2018-03-12 23:22:35 +0000 |
| commit | a7bb0cc09e1f5234698371819a4e6c9226583b1b (patch) | |
| tree | 0fe8120178a8e2a92372f63ff2ab5a7f17b92c1b /clang-tools-extra/unittests/clangd/TestFS.h | |
| parent | 1527dec1396d89ce9b2956564ffc60056c825c6a (diff) | |
| download | bcm5719-llvm-a7bb0cc09e1f5234698371819a4e6c9226583b1b.tar.gz bcm5719-llvm-a7bb0cc09e1f5234698371819a4e6c9226583b1b.zip | |
[clangd] Remove Tagged and some related APIs from ClangdServer.
Context can do what Tagged was intended to support (snapshot filesystems),
and less intrusively.
getTaggedFileSystem() no longer needs a filename.
Cleanups while here:
- code-complete now returns errors as Expected, like other functions
- added an alias Callback<T> for the usual callback function type
llvm-svn: 327344
Diffstat (limited to 'clang-tools-extra/unittests/clangd/TestFS.h')
| -rw-r--r-- | clang-tools-extra/unittests/clangd/TestFS.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/unittests/clangd/TestFS.h b/clang-tools-extra/unittests/clangd/TestFS.h index b86adbe7374..bec8817c20b 100644 --- a/clang-tools-extra/unittests/clangd/TestFS.h +++ b/clang-tools-extra/unittests/clangd/TestFS.h @@ -26,13 +26,12 @@ buildTestFS(llvm::StringMap<std::string> const &Files); // A VFS provider that returns TestFSes containing a provided set of files. class MockFSProvider : public FileSystemProvider { public: - Tagged<IntrusiveRefCntPtr<vfs::FileSystem>> - getTaggedFileSystem(PathRef File) override; + IntrusiveRefCntPtr<vfs::FileSystem> getFileSystem() override { + return buildTestFS(Files); + } - llvm::Optional<std::string> ExpectedFile; // If relative paths are used, they are resolved with testPath(). llvm::StringMap<std::string> Files; - VFSTag Tag = VFSTag(); }; // A Compilation database that returns a fixed set of compile flags. |

