Skip to content

Commit 5a79364

Browse files
committed
[flang] Fix build bot problem
A recent change is eliciting a valid warning from the out-of-tree flang build bot; fix by using a reference in a range-based for(). Differential Revision: https://reviews.llvm.org/D124682
1 parent aa7470a commit 5a79364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Lower/ConvertVariable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ void Fortran::lower::defineCommonBlocks(
10041004
std::vector<std::tuple<fir::GlobalOp, Fortran::semantics::MutableSymbolVector,
10051005
mlir::Location>>
10061006
delayedInitializations;
1007-
for (const auto [common, size] : commonBlocks)
1007+
for (const auto &[common, size] : commonBlocks)
10081008
if (auto delayedInit = declareCommonBlock(converter, common, size))
10091009
delayedInitializations.emplace_back(std::move(*delayedInit));
10101010
for (auto &[global, cmnBlkMems, loc] : delayedInitializations)

0 commit comments

Comments
 (0)