diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-26 22:32:06 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-26 22:32:06 +0000 |
| commit | db8a742206749b2677c78d0125a21968a7df37b3 (patch) | |
| tree | 91edaf8086e0428cd113bb6ca9b5e1e0b0ca0486 /clang-tools-extra/clangd/SourceCode.cpp | |
| parent | 1da7eac87c15662f808f69e260e3ec47923c28f6 (diff) | |
Basic: Return a reference from FileManager::getVirtualFileSystem, NFC
FileManager constructs a VFS in its constructor if it isn't passed one,
and there's no way to reset it. Make that contract clear by returning a
reference from its accessor.
https://reviews.llvm.org/D59388
llvm-svn: 357038
Diffstat (limited to 'clang-tools-extra/clangd/SourceCode.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/SourceCode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index 86146758a541..4366f36072ea 100644 --- a/clang-tools-extra/clangd/SourceCode.cpp +++ b/clang-tools-extra/clangd/SourceCode.cpp @@ -265,7 +265,7 @@ llvm::Optional<std::string> getCanonicalPath(const FileEntry *F, llvm::SmallString<128> FilePath = F->getName(); if (!llvm::sys::path::is_absolute(FilePath)) { if (auto EC = - SourceMgr.getFileManager().getVirtualFileSystem()->makeAbsolute( + SourceMgr.getFileManager().getVirtualFileSystem().makeAbsolute( FilePath)) { elog("Could not turn relative path '{0}' to absolute: {1}", FilePath, EC.message()); |
