[PATCH] D81079: [clangd] Add std::move() to a return statement to please some compilers.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 07:07:58 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa3220dffcb1d: [clangd] Add std::move() to a return statement to please some compilers. (authored by mboehme).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81079/new/

https://reviews.llvm.org/D81079

Files:
  clang-tools-extra/clangd/index/FileIndex.cpp


Index: clang-tools-extra/clangd/index/FileIndex.cpp
===================================================================
--- clang-tools-extra/clangd/index/FileIndex.cpp
+++ clang-tools-extra/clangd/index/FileIndex.cpp
@@ -201,7 +201,8 @@
     RelB.insert(*Rel);
   }
   IF.Relations = std::move(RelB).build();
-  return IF;
+  // Explicit move here is needed by some compilers.
+  return std::move(IF);
 }
 
 SlabTuple indexMainDecls(ParsedAST &AST) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81079.268184.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200603/6911f96d/attachment.bin>


More information about the cfe-commits mailing list