Use of auto that causes a copy
Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/data/mci/1d13f9e23b50862fd310b1df4dcad130/bazel_cache/95c775dabb4c264f56421729e4dd2481/execroot/_main/src/mongo/s/query/planner/cluster_aggregate.cpp:667: AUTO_CAUSES_COPY 175543 Using the "auto" keyword without an "&" causes the copy of an object of type "boost::optional<mongo::CollectionRoutingInfo>".
/data/mci/1d13f9e23b50862fd310b1df4dcad130/bazel_cache/95c775dabb4c264f56421729e4dd2481/execroot/_main/src/mongo/s/query/planner/cluster_aggregate.cpp:667: AUTO_CAUSES_COPY 175543 The variable "cri" has a non-"const" type, however its value is never changed.