[PATCH] D54157: [clangd] [NFC] Fix clang-tidy warnings.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 6 09:24:38 PST 2018


kadircet created this revision.
kadircet added reviewers: ioeric, sammccall, ilya-biryukov, hokein.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay.

Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D54157

Files:
  clangd/index/FileIndex.cpp
  unittests/clangd/BackgroundIndexTests.cpp


Index: unittests/clangd/BackgroundIndexTests.cpp
===================================================================
--- unittests/clangd/BackgroundIndexTests.cpp
+++ unittests/clangd/BackgroundIndexTests.cpp
@@ -43,7 +43,7 @@
       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");
Index: clangd/index/FileIndex.cpp
===================================================================
--- clangd/index/FileIndex.cpp
+++ clangd/index/FileIndex.cpp
@@ -126,7 +126,7 @@
       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());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54157.172779.patch
Type: text/x-patch
Size: 1011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181106/6c19d93c/attachment.bin>


More information about the cfe-commits mailing list