[flang-commits] [flang] [flang][OpenMP] Update comments, NFC (PR #191709)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Sun Apr 12 06:24:22 PDT 2026
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/191709
Some comments in openmp-utils.cpp became outdated after the code had changed.
>From 0bd17c3d72d00505e5e7a4053ab40adfe7cfe083 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Sun, 12 Apr 2026 08:20:38 -0500
Subject: [PATCH] [flang][OpenMP] Update comments, NFC
Some comments in openmp-utils.cpp became outdated after the code had
changed.
---
flang/include/flang/Semantics/openmp-utils.h | 10 +++++-----
flang/lib/Semantics/openmp-utils.cpp | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/flang/include/flang/Semantics/openmp-utils.h b/flang/include/flang/Semantics/openmp-utils.h
index 13c05739041e0..b449988abe9c8 100644
--- a/flang/include/flang/Semantics/openmp-utils.h
+++ b/flang/include/flang/Semantics/openmp-utils.h
@@ -213,14 +213,14 @@ WithReason<int64_t> GetHeightWithReason(
const parser::OmpDirectiveSpecification &spec, unsigned version,
SemanticsContext *semaCtx = nullptr);
-// Return the depth of the affected nests:
-// {affected-depth, reason, must-be-perfect-nest}.
+/// Return the depth of the affected nest(s):
+/// {affected-depth, must-be-perfect-nest}.
std::pair<WithReason<int64_t>, bool> GetAffectedNestDepthWithReason(
const parser::OmpDirectiveSpecification &spec, unsigned version,
SemanticsContext *semaCtx = nullptr);
-// Return the range of the affected nests in the sequence:
-// {first, count, reason}.
-// If the range is "the whole sequence", the return value will be {1, -1, ...}.
+/// Return the range of the affected nests in the sequence:
+/// {first, count}.
+/// If the range is "the whole sequence", the return value will be {1, -1}.
WithReason<std::pair<int64_t, int64_t>> GetAffectedLoopRangeWithReason(
const parser::OmpDirectiveSpecification &spec, unsigned version,
SemanticsContext *semaCtx = nullptr);
diff --git a/flang/lib/Semantics/openmp-utils.cpp b/flang/lib/Semantics/openmp-utils.cpp
index 218f84cda75f8..c901d00695093 100644
--- a/flang/lib/Semantics/openmp-utils.cpp
+++ b/flang/lib/Semantics/openmp-utils.cpp
@@ -966,8 +966,8 @@ WithReason<T> operator+(T a, const WithReason<T> &b) {
return WithReason<T>{a, Reason()} + b;
}
-// Return the depth of the affected nests:
-// {affected-depth, must-be-perfect-nest}.
+/// Return the depth of the affected nest(s):
+/// {affected-depth, must-be-perfect-nest}.
std::pair<WithReason<int64_t>, bool> GetAffectedNestDepthWithReason(
const parser::OmpDirectiveSpecification &spec, unsigned version,
SemanticsContext *semaCtx) {
@@ -1047,8 +1047,8 @@ std::pair<WithReason<int64_t>, bool> GetAffectedNestDepthWithReason(
return {{}, false};
}
-// Return the range of the affected nests in the sequence:
-// {first, count, std::move(reason)}.
+/// Return the range of the affected nests in the sequence:
+/// {first, count}
WithReason<std::pair<int64_t, int64_t>> GetAffectedLoopRangeWithReason(
const parser::OmpDirectiveSpecification &spec, unsigned version,
SemanticsContext *semaCtx) {
More information about the flang-commits
mailing list