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.
Ends up being pretty sizable, TemplateArgumentLoc has a TemplateArgument (which we typically pass around by value), but it also has a TemplateArgumentLocInfo, which is a pair of pointers + a pair of source locations.