Skip to content

Commit

Permalink
[flang] Fix build bot problem
Browse files Browse the repository at this point in the history
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
  • Loading branch information
klausler committed Apr 29, 2022
1 parent aa7470a commit 5a79364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Lower/ConvertVariable.cpp
Expand Up @@ -1004,7 +1004,7 @@ void Fortran::lower::defineCommonBlocks(
std::vector<std::tuple<fir::GlobalOp, Fortran::semantics::MutableSymbolVector,
mlir::Location>>
delayedInitializations;
for (const auto [common, size] : commonBlocks)
for (const auto &[common, size] : commonBlocks)
if (auto delayedInit = declareCommonBlock(converter, common, size))
delayedInitializations.emplace_back(std::move(*delayedInit));
for (auto &[global, cmnBlkMems, loc] : delayedInitializations)
Expand Down

0 comments on commit 5a79364

Please sign in to comment.