[flang-commits] [flang] [flang][OpenMP] Rename dirSpec to spec in openmp-parsers.cpp, NFC (PR #193967)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Fri Apr 24 06:34:18 PDT 2026
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/193967
None
>From 242baab41b7f1a237c78ff385ef5935b61df3266 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Fri, 24 Apr 2026 08:28:38 -0500
Subject: [PATCH] [flang][OpenMP] Rename dirSpec to spec in openmp-parsers.cpp,
NFC
---
flang/lib/Parser/openmp-parsers.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index 72089d6cefe1a..7798979ab2a6c 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -1775,10 +1775,10 @@ auto OmpDirectiveSpecificationParser::Parse(ParseState &state) const
return std::nullopt;
}
-static bool IsStandaloneOrdered(const OmpDirectiveSpecification &dirSpec) {
+static bool IsStandaloneOrdered(const OmpDirectiveSpecification &spec) {
// An ORDERED construct is standalone if it has DOACROSS or DEPEND clause.
- return dirSpec.DirId() == llvm::omp::Directive::OMPD_ordered &&
- llvm::any_of(dirSpec.Clauses().v, [](const OmpClause &clause) {
+ return spec.DirId() == llvm::omp::Directive::OMPD_ordered &&
+ llvm::any_of(spec.Clauses().v, [](const OmpClause &clause) {
llvm::omp::Clause id{clause.Id()};
return id == llvm::omp::Clause::OMPC_depend ||
id == llvm::omp::Clause::OMPC_doacross;
@@ -1953,13 +1953,13 @@ struct OmpEndDirectiveParser {
std::optional<resultType> Parse(ParseState &state) const {
if (startOmpLine.Parse(state)) {
if (auto endToken{verbatim("END"_sptok).Parse(state)}) {
- if (auto &&dirSpec{OmpBeginDirectiveParser(dirs_).Parse(state)}) {
+ if (auto &&spec{OmpBeginDirectiveParser(dirs_).Parse(state)}) {
// Extend the "source" on both the OmpDirectiveName and the
// OmpDirectiveNameSpecification.
- CharBlock &nameSource{std::get<OmpDirectiveName>(dirSpec->t).source};
+ CharBlock &nameSource{std::get<OmpDirectiveName>(spec->t).source};
nameSource.ExtendToCover(endToken->source);
- dirSpec->source.ExtendToCover(endToken->source);
- return std::move(*dirSpec);
+ spec->source.ExtendToCover(endToken->source);
+ return std::move(*spec);
}
}
}
@@ -2153,8 +2153,8 @@ struct OmpAtomicConstructParser {
}
recursing_ = true;
- auto dirSpec{OmpDirectiveSpecificationParser{}.Parse(state)};
- if (!dirSpec || dirSpec->DirId() != llvm::omp::Directive::OMPD_atomic) {
+ auto spec{OmpDirectiveSpecificationParser{}.Parse(state)};
+ if (!spec || spec->DirId() != llvm::omp::Directive::OMPD_atomic) {
recursing_ = false;
return std::nullopt;
}
@@ -2172,7 +2172,7 @@ struct OmpAtomicConstructParser {
}
}
recursing_ = false;
- return OpenMPAtomicConstruct{OmpBeginDirective(std::move(*dirSpec)),
+ return OpenMPAtomicConstruct{OmpBeginDirective(std::move(*spec)),
std::move(tail.first),
llvm::transformOptional(std::move(tail.second),
[](auto &&s) { return OmpEndDirective(std::move(s)); })};
More information about the flang-commits
mailing list