[clangd] Add std::move() to a return statement to please some compilers.
authorMartin Boehme <mboehme@google.com>
Wed, 3 Jun 2020 11:07:13 +0000 (13:07 +0200)
committerMartin Boehme <mboehme@google.com>
Wed, 3 Jun 2020 13:40:01 +0000 (15:40 +0200)
This has been causing build errors in Swift CI.

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

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

index 79ec112..1a18af1 100644 (file)
@@ -201,7 +201,8 @@ FileShardedIndex::getShard(llvm::StringRef Uri) const {
     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) {