[flang-commits] [flang] [flang][OpenMP] Rename variable `block` to `body`, NFC (PR #156702)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Wed Sep 3 08:48:43 PDT 2025
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/156702
`block` is a global variable that represents the Block parser, so avoid using local variables with the same name.
>From 3cd4724bee8a71729318d0e06a02e8f3cb4f7f1c Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Wed, 3 Sep 2025 10:43:15 -0500
Subject: [PATCH] [flang][OpenMP] Rename variable `block` to `body`, NFC
`block` is a global variable that represents the Block parser, so avoid
using local variables with the same name.
---
flang/lib/Parser/openmp-parsers.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index cc4e59d318bbe..1b7665ce4acf5 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -1289,9 +1289,9 @@ struct StrictlyStructuredBlockParser {
if (lookAhead(skipStuffBeforeStatement >> "BLOCK"_tok).Parse(state)) {
if (auto epc{Parser<ExecutionPartConstruct>{}.Parse(state)}) {
if (IsFortranBlockConstruct(*epc)) {
- Block block;
- block.emplace_back(std::move(*epc));
- return std::move(block);
+ Block body;
+ body.emplace_back(std::move(*epc));
+ return std::move(body);
}
}
}
More information about the flang-commits
mailing list