[flang-commits] [flang] 5a79364 - [flang] Fix build bot problem
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Fri Apr 29 11:13:27 PDT 2022
Author: Peter Klausler
Date: 2022-04-29T11:13:19-07:00
New Revision: 5a7936401c0a5a8959273108051b094ffba84b8c
URL: https://github.com/llvm/llvm-project/commit/5a7936401c0a5a8959273108051b094ffba84b8c
DIFF: https://github.com/llvm/llvm-project/commit/5a7936401c0a5a8959273108051b094ffba84b8c.diff
LOG: [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
Added:
Modified:
flang/lib/Lower/ConvertVariable.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/ConvertVariable.cpp b/flang/lib/Lower/ConvertVariable.cpp
index 6c0df49a56e5..88b0e69bf7f1 100644
--- a/flang/lib/Lower/ConvertVariable.cpp
+++ b/flang/lib/Lower/ConvertVariable.cpp
@@ -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)
More information about the flang-commits
mailing list