mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
[clang-doc] SerializeIndex - pass Index param by constant reference
Silence coverity warnings about unnecessary copies
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user