Reported by Coverity:
AUTO_CAUSES_COPY
Unnecessary object copies can affect performance
- Inside FrontendActions.cpp file,
In clang::DumpModuleInfoAction::ExecuteAction(): Using the auto keyword without an & causes the copy of an object of type pair.
- Inside ComputeDependence.cpp file,
In clang::computeDependence(clang::OverloadExpr *, bool, bool, bool): Using the auto keyword without an & causes the copy of an object of type TemplateArgumentLoc.
So succs and pred are both of type AdjacentBlock. This type is 2 ptrs long, which is roughly the 'decision point' for me. That is, a 2 pointer copy is cheap, and forming a reference requires a series of indirections, so I could go either way on this one. However, in both cases, only a single indirection is done (since enqueueBlock is being called with a CFGBlock via the conversion operator), so the indirection cost is low.
So I think these are OK to me.