llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clangd Author: None (serge-sans-paille) <details> <summary>Changes</summary> That's an automated patch generated from clang-tidy performance-use-std-move as a follow-up to #<!-- -->184136 --- Full diff: https://github.com/llvm/llvm-project/pull/184146.diff 2 Files Affected: - (modified) clang-tools-extra/clangd/Preamble.cpp (+1-1) - (modified) clang-tools-extra/clangd/XRefs.cpp (+2-2) ``````````diff diff --git a/clang-tools-extra/clangd/Preamble.cpp b/clang-tools-extra/clangd/Preamble.cpp index 09aaf3290b585..cdda0208a96d6 100644 --- a/clang-tools-extra/clangd/Preamble.cpp +++ b/clang-tools-extra/clangd/Preamble.cpp @@ -689,7 +689,7 @@ buildPreamble(PathRef FileName, CompilerInvocation CI, Result->Macros = CapturedInfo.takeMacros(); Result->Marks = CapturedInfo.takeMarks(); - Result->StatCache = StatCache; + Result->StatCache = std::move(StatCache); Result->MainIsIncludeGuarded = CapturedInfo.isMainFileIncludeGuarded(); // Move the options instead of copying them. The invocation doesn't need // them anymore. diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 5b9ba1baa0705..c0ef0131c238f 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -248,7 +248,7 @@ locateMacroReferent(const syntax::Token &TouchedIdentifier, ParsedAST &AST, LocatedSymbol Macro; Macro.Name = std::string(M->Name); Macro.PreferredDeclaration = *Loc; - Macro.Definition = Loc; + Macro.Definition = std::move(Loc); Macro.ID = getSymbolID(M->Name, M->Info, AST.getSourceManager()); return Macro; } @@ -1478,7 +1478,7 @@ maybeFindIncludeReferences(ParsedAST &AST, Position Pos, ReferencesResult::Reference Result; Result.Loc.range = rangeTillEOL(SM.getBufferData(SM.getMainFileID()), IncludeOnLine->HashOffset); - Result.Loc.uri = URIMainFile; + Result.Loc.uri = std::move(URIMainFile); Results.References.push_back(std::move(Result)); return Results; } `````````` </details> https://github.com/llvm/llvm-project/pull/184146 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
