Author: Kadir Cetinkaya
Date: 2020-04-30T10:25:22+02:00
New Revision: 0dedb43153e67b19ddaade384b0ccb1028a6f4ad

URL: 
https://github.com/llvm/llvm-project/commit/0dedb43153e67b19ddaade384b0ccb1028a6f4ad
DIFF: 
https://github.com/llvm/llvm-project/commit/0dedb43153e67b19ddaade384b0ccb1028a6f4ad.diff

LOG: [clangd] Fix windows build bots without rvalue refs

Added: 
    

Modified: 
    clang-tools-extra/clangd/index/Background.cpp
    clang-tools-extra/clangd/index/FileIndex.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/Background.cpp 
b/clang-tools-extra/clangd/index/Background.cpp
index a46ba18f5b6c..9880c6b4ab2a 100644
--- a/clang-tools-extra/clangd/index/Background.cpp
+++ b/clang-tools-extra/clangd/index/Background.cpp
@@ -200,7 +200,7 @@ void BackgroundIndex::update(
   for (const auto &FileIt : FilesToUpdate) {
     auto Uri = FileIt.first();
     // ShardedIndex should always have a shard for a file in Index.Sources.
-    auto IF = ShardedIndex.getShard(Uri).getValue();
+    auto IF = std::move(ShardedIndex.getShard(Uri).getValue());
     PathRef Path = FileIt.getValue().first;
 
     // Only store command line hash for main files of the TU, since our

diff  --git a/clang-tools-extra/clangd/index/FileIndex.cpp 
b/clang-tools-extra/clangd/index/FileIndex.cpp
index bf236bd8411b..b6ee91db20f5 100644
--- a/clang-tools-extra/clangd/index/FileIndex.cpp
+++ b/clang-tools-extra/clangd/index/FileIndex.cpp
@@ -381,7 +381,7 @@ void FileIndex::updatePreamble(PathRef Path, 
llvm::StringRef Version,
   for (auto Uri : ShardedIndex.getAllSources()) {
     // We are using the key received from ShardedIndex, so it should always
     // exist.
-    auto IF = ShardedIndex.getShard(Uri).getValue();
+    auto IF = std::move(ShardedIndex.getShard(Uri).getValue());
     PreambleSymbols.update(
         Uri, std::make_unique<SymbolSlab>(std::move(*IF.Symbols)),
         std::make_unique<RefSlab>(),


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to