Skip to content

Commit 0d03ea3

Browse files
committed
[SourceKit] Fix some -Wpessimizing-move issues.
No functionality change.
1 parent 33a6cce commit 0d03ea3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tools/SourceKit/lib/Core/Context.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
using namespace SourceKit;
1818

1919
SourceKit::Context::Context(StringRef RuntimeLibPath)
20-
: RuntimeLibPath(RuntimeLibPath) {
21-
NotificationCtr.reset(new NotificationCenter());
22-
SwiftLang = std::move(LangSupport::createSwiftLangSupport(*this));
20+
: RuntimeLibPath(RuntimeLibPath),
21+
SwiftLang(LangSupport::createSwiftLangSupport(*this)),
22+
NotificationCtr(new NotificationCenter()) {
2323
}
2424

2525
SourceKit::Context::~Context() {

tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ static sourcekitd_response_t codeCompleteOpen(StringRef Name,
13071307
SKGroupedCodeCompletionConsumer CCC(RespBuilder);
13081308
std::unique_ptr<SKOptionsDictionary> options;
13091309
if (optionsDict)
1310-
options = std::move(llvm::make_unique<SKOptionsDictionary>(*optionsDict));
1310+
options = llvm::make_unique<SKOptionsDictionary>(*optionsDict);
13111311
LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
13121312
Lang.codeCompleteOpen(Name, InputBuf, Offset, options.get(), CCC, Args);
13131313
return CCC.createResponse();
@@ -1328,7 +1328,7 @@ codeCompleteUpdate(StringRef name, int64_t offset,
13281328
SKGroupedCodeCompletionConsumer CCC(RespBuilder);
13291329
std::unique_ptr<SKOptionsDictionary> options;
13301330
if (optionsDict)
1331-
options = std::move(llvm::make_unique<SKOptionsDictionary>(*optionsDict));
1331+
options = llvm::make_unique<SKOptionsDictionary>(*optionsDict);
13321332
LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
13331333
Lang.codeCompleteUpdate(name, offset, options.get(), CCC);
13341334
return CCC.createResponse();

0 commit comments

Comments
 (0)