@@ -818,7 +818,7 @@ LabeledStatementInfoTuplePOD GetLabel(
818818void CheckBranchesIntoDoBody (const SourceStmtList &branches,
819819 const TargetStmtMap &labels, const IndexList &loopBodies,
820820 SemanticsContext &context) {
821- for (const auto branch : branches) {
821+ for (const auto & branch : branches) {
822822 const auto &label{branch.parserLabel };
823823 auto branchTarget{GetLabel (labels, label)};
824824 if (HasScope (branchTarget.proxyForScope )) {
@@ -870,7 +870,7 @@ void CheckLabelDoConstraints(const SourceStmtList &dos,
870870 const SourceStmtList &branches, const TargetStmtMap &labels,
871871 const std::vector<ProxyForScope> &scopes, SemanticsContext &context) {
872872 IndexList loopBodies;
873- for (const auto stmt : dos) {
873+ for (const auto & stmt : dos) {
874874 const auto &label{stmt.parserLabel };
875875 const auto &scope{stmt.proxyForScope };
876876 const auto &position{stmt.parserCharBlock };
@@ -924,7 +924,7 @@ void CheckLabelDoConstraints(const SourceStmtList &dos,
924924void CheckScopeConstraints (const SourceStmtList &stmts,
925925 const TargetStmtMap &labels, const std::vector<ProxyForScope> &scopes,
926926 SemanticsContext &context) {
927- for (const auto stmt : stmts) {
927+ for (const auto & stmt : stmts) {
928928 const auto &label{stmt.parserLabel };
929929 const auto &scope{stmt.proxyForScope };
930930 const auto &position{stmt.parserCharBlock };
@@ -943,7 +943,7 @@ void CheckScopeConstraints(const SourceStmtList &stmts,
943943
944944void CheckBranchTargetConstraints (const SourceStmtList &stmts,
945945 const TargetStmtMap &labels, SemanticsContext &context) {
946- for (const auto stmt : stmts) {
946+ for (const auto & stmt : stmts) {
947947 const auto &label{stmt.parserLabel };
948948 auto branchTarget{GetLabel (labels, label)};
949949 if (HasScope (branchTarget.proxyForScope )) {
@@ -981,7 +981,7 @@ void CheckBranchConstraints(const SourceStmtList &branches,
981981
982982void CheckDataXferTargetConstraints (const SourceStmtList &stmts,
983983 const TargetStmtMap &labels, SemanticsContext &context) {
984- for (const auto stmt : stmts) {
984+ for (const auto & stmt : stmts) {
985985 const auto &label{stmt.parserLabel };
986986 auto ioTarget{GetLabel (labels, label)};
987987 if (HasScope (ioTarget.proxyForScope )) {
0 commit comments