diff options
| author | Ilya Biryukov <ibiryukov@google.com> | 2019-01-07 15:45:19 +0000 |
|---|---|---|
| committer | Ilya Biryukov <ibiryukov@google.com> | 2019-01-07 15:45:19 +0000 |
| commit | f2001aa74394885dc178c5997b83687acb4f55e4 (patch) | |
| tree | 80666e16bbebadef8f35d1d962e09da8a7812d13 /clang-tools-extra/clangd/Compiler.cpp | |
| parent | 25d3de8a0ac4d65f2ac9820ba62a372414780649 (diff) | |
| download | bcm5719-llvm-f2001aa74394885dc178c5997b83687acb4f55e4.tar.gz bcm5719-llvm-f2001aa74394885dc178c5997b83687acb4f55e4.zip | |
[clangd] Remove 'using namespace llvm' from .cpp files. NFC
The new guideline is to qualify with 'llvm::' explicitly both in
'.h' and '.cpp' files. This simplifies moving the code between
header and source files and is easier to keep consistent.
llvm-svn: 350531
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 " |

