[clang-tools-extra] 43c6334 - [clangd] Work around gcc bug after 8f237f9b0
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 16:07:38 PDT 2020
Author: Sam McCall
Date: 2020-03-26T00:06:54+01:00
New Revision: 43c63349f55d89e335108692aa0970a4602f4385
URL: https://github.com/llvm/llvm-project/commit/43c63349f55d89e335108692aa0970a4602f4385
DIFF: https://github.com/llvm/llvm-project/commit/43c63349f55d89e335108692aa0970a4602f4385.diff
LOG: [clangd] Work around gcc bug after 8f237f9b0
Added:
Modified:
clang-tools-extra/clangd/SemanticSelection.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/SemanticSelection.cpp b/clang-tools-extra/clangd/SemanticSelection.cpp
index 7477cb6a737a..a6b1ebfb8327 100644
--- a/clang-tools-extra/clangd/SemanticSelection.cpp
+++ b/clang-tools-extra/clangd/SemanticSelection.cpp
@@ -64,7 +64,7 @@ llvm::Expected<SelectionRange> getSemanticRanges(ParsedAST &AST, Position Pos) {
// Return an empty range at the point.
SelectionRange Empty;
Empty.range.start = Empty.range.end = Pos;
- return Empty;
+ return std::move(Empty);
}
// Convert to the LSP linked-list representation.
@@ -78,7 +78,7 @@ llvm::Expected<SelectionRange> getSemanticRanges(ParsedAST &AST, Position Pos) {
Tail->range = std::move(Range);
}
- return Head;
+ return std::move(Head);
}
} // namespace clangd
More information about the cfe-commits
mailing list