[clang-tools-extra] c24e197 - [clangd] getHover - pass FormatStyle argument by const reference
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 18 06:46:09 PST 2022
Author: Simon Pilgrim
Date: 2022-02-18T14:45:51Z
New Revision: c24e197aaad5333717a27f6e4346f97da84821ed
URL: https://github.com/llvm/llvm-project/commit/c24e197aaad5333717a27f6e4346f97da84821ed
DIFF: https://github.com/llvm/llvm-project/commit/c24e197aaad5333717a27f6e4346f97da84821ed.diff
LOG: [clangd] getHover - pass FormatStyle argument by const reference
Reported by coverity
Added:
Modified:
clang-tools-extra/clangd/Hover.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp
index dda5ad36e9b89..8b22018411404 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());
More information about the cfe-commits
mailing list