Skip to content

Commit cd5c555

Browse files
authored
[Clang][NFC] Use move in std::vector local in HandleTranslationUnit (#142851)
Static analysis flagged this since we could move MergedRanges since it is a std::vector, a local and unused after that line. So there is a potential saving.
1 parent dc9b8fe commit cd5c555

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Frontend/FrontendAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class DeserializedDeclsSourceRangePrinter : public ASTConsumer,
181181
if (MergedRanges.back().second < It->second)
182182
MergedRanges.back().second = It->second;
183183
}
184-
Result.push_back({Data.Ref->getName(), MergedRanges});
184+
Result.push_back({Data.Ref->getName(), std::move(MergedRanges)});
185185
}
186186
printJson(Result);
187187
}

0 commit comments

Comments
 (0)