Skip to content

Commit

Permalink
[clang-doc] SerializeIndex - pass Index param by constant reference
Browse files Browse the repository at this point in the history
Silence coverity warnings about unnecessary copies
  • Loading branch information
RKSimon committed Feb 17, 2022
1 parent f29f86b commit 1c502c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/HTMLGenerator.cpp
Expand Up @@ -899,7 +899,7 @@ static llvm::Error SerializeIndex(ClangDocContext &CDCtx) {
}
CDCtx.Idx.sort();
llvm::json::OStream J(OS, 2);
std::function<void(Index)> IndexToJSON = [&](Index I) {
std::function<void(Index)> IndexToJSON = [&](const Index &I) {
J.object([&] {
J.attribute("USR", toHex(llvm::toStringRef(I.USR)));
J.attribute("Name", I.Name);
Expand Down

0 comments on commit 1c502c6

Please sign in to comment.