Author: Simon Pilgrim Date: 2022-02-18T17:27:45Z New Revision: 9415fbbbcf73ab90692fafdac5bd6e302d07ba4b
URL: https://github.com/llvm/llvm-project/commit/9415fbbbcf73ab90692fafdac5bd6e302d07ba4b DIFF: https://github.com/llvm/llvm-project/commit/9415fbbbcf73ab90692fafdac5bd6e302d07ba4b.diff LOG: [clangd] getHover - pass FormatStyle argument by const reference Reported by coverity Added: Modified: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/Hover.h Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp index dda5ad36e9b8..8b2201841140 100644 --- a/clang-tools-extra/clangd/Hover.cpp +++ b/clang-tools-extra/clangd/Hover.cpp @@ -963,7 +963,7 @@ void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI, } // namespace llvm::Optional<HoverInfo> getHover(ParsedAST &AST, Position Pos, - format::FormatStyle Style, + const format::FormatStyle &Style, const SymbolIndex *Index) { PrintingPolicy PP = getPrintingPolicy(AST.getASTContext().getPrintingPolicy()); diff --git a/clang-tools-extra/clangd/Hover.h b/clang-tools-extra/clangd/Hover.h index 7478ede88a46..1a46ff5ad772 100644 --- a/clang-tools-extra/clangd/Hover.h +++ b/clang-tools-extra/clangd/Hover.h @@ -137,7 +137,7 @@ inline bool operator==(const HoverInfo::Param &LHS, /// Get the hover information when hovering at \p Pos. llvm::Optional<HoverInfo> getHover(ParsedAST &AST, Position Pos, - format::FormatStyle Style, + const format::FormatStyle &Style, const SymbolIndex *Index); } // namespace clangd _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits