[clang-tools-extra] r346308 - [clangd] [NFC] Fix clang-tidy warnings.

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 7 04:25:27 PST 2018


Author: kadircet
Date: Wed Nov  7 04:25:27 2018
New Revision: 346308

URL: http://llvm.org/viewvc/llvm-project?rev=346308&view=rev
Log:
[clangd] [NFC] Fix clang-tidy warnings.

Reviewers: ioeric, sammccall, ilya-biryukov, hokein

Subscribers: MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D54157

Modified:
    clang-tools-extra/trunk/clangd/index/FileIndex.cpp
    clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp

Modified: clang-tools-extra/trunk/clangd/index/FileIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/FileIndex.cpp?rev=346308&r1=346307&r2=346308&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/FileIndex.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/FileIndex.cpp Wed Nov  7 04:25:27 2018
@@ -126,7 +126,7 @@ FileSymbols::buildIndex(IndexType Type,
       for (const auto &Sym : *Slab) {
         auto I = Merged.try_emplace(Sym.ID, Sym);
         if (!I.second)
-          I.first->second = mergeSymbol(std::move(I.first->second), Sym);
+          I.first->second = mergeSymbol(I.first->second, Sym);
       }
     }
     SymsStorage.reserve(Merged.size());

Modified: clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp?rev=346308&r1=346307&r2=346308&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.cpp Wed Nov  7 04:25:27 2018
@@ -43,7 +43,7 @@ TEST(BackgroundIndexTest, IndexTwoFiles)
       void f_b() {
         (void)common;
       })cpp";
-  BackgroundIndex Idx(Context::empty(), "", FS, /*URISchmes=*/{"unittest"});
+  BackgroundIndex Idx(Context::empty(), "", FS, /*URISchemes=*/{"unittest"});
 
   tooling::CompileCommand Cmd;
   Cmd.Filename = testPath("root/A.cc");




More information about the cfe-commits mailing list