Skip to content

Commit 2954d1f

Browse files
committed
[include-cleaner] Fix -Wpessimizing-move in IncludeCleaner.cpp (NFC)
/llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] return std::move(llvm::errorCodeToError(Err)); ^ /llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14: note: remove std::move call here return std::move(llvm::errorCodeToError(Err)); ^~~~~~~~~~ ~ 1 error generated.
1 parent 584e00a commit 2954d1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ mapInputsToAbsPaths(clang::tooling::CompilationDatabase &CDB,
299299
if (auto Err = VFS->makeAbsolute(AbsPath)) {
300300
llvm::errs() << "Failed to get absolute path for " << Source << " : "
301301
<< Err.message() << '\n';
302-
return std::move(llvm::errorCodeToError(Err));
302+
return llvm::errorCodeToError(Err);
303303
}
304304
std::vector<clang::tooling::CompileCommand> Cmds =
305305
CDB.getCompileCommands(AbsPath);

0 commit comments

Comments
 (0)