diff options
Diffstat (limited to 'clang-tools-extra/clangd/Compiler.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/Compiler.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/clang-tools-extra/clangd/Compiler.cpp b/clang-tools-extra/clangd/Compiler.cpp index 011841c4613..c94ef75522e 100644 --- a/clang-tools-extra/clangd/Compiler.cpp +++ b/clang-tools-extra/clangd/Compiler.cpp @@ -14,21 +14,20 @@ #include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" -using namespace llvm; namespace clang { namespace clangd { void IgnoreDiagnostics::log(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) { // FIXME: format lazily, in case vlog is off. - SmallString<64> Message; + llvm::SmallString<64> Message; Info.FormatDiagnostic(Message); - SmallString<64> Location; + llvm::SmallString<64> Location; if (Info.hasSourceManager() && Info.getLocation().isValid()) { auto &SourceMgr = Info.getSourceManager(); auto Loc = SourceMgr.getFileLoc(Info.getLocation()); - raw_svector_ostream OS(Location); + llvm::raw_svector_ostream OS(Location); Loc.print(OS, SourceMgr); OS << ":"; } @@ -41,11 +40,13 @@ void IgnoreDiagnostics::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, IgnoreDiagnostics::log(DiagLevel, Info); } -std::unique_ptr<CompilerInstance> prepareCompilerInstance( - std::unique_ptr<clang::CompilerInvocation> CI, - const PrecompiledPreamble *Preamble, std::unique_ptr<MemoryBuffer> Buffer, - std::shared_ptr<PCHContainerOperations> PCHs, - IntrusiveRefCntPtr<vfs::FileSystem> VFS, DiagnosticConsumer &DiagsClient) { +std::unique_ptr<CompilerInstance> +prepareCompilerInstance(std::unique_ptr<clang::CompilerInvocation> CI, + const PrecompiledPreamble *Preamble, + std::unique_ptr<llvm::MemoryBuffer> Buffer, + std::shared_ptr<PCHContainerOperations> PCHs, + llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, + DiagnosticConsumer &DiagsClient) { assert(VFS && "VFS is null"); assert(!CI->getPreprocessorOpts().RetainRemappedFileBuffers && "Setting RetainRemappedFileBuffers to true will cause a memory leak " |

