[flang-commits] [flang] 34c8339 - [flang][OpenMP] Update comments, NFC (#191709)
via flang-commits
flang-commits at lists.llvm.org
Sun Apr 12 06:34:23 PDT 2026
Author: Krzysztof Parzyszek
Date: 2026-04-12T08:34:17-05:00
New Revision: 34c83399fe001cd3c1a19f38f30c83cdc2e8399f
URL: https://github.com/llvm/llvm-project/commit/34c83399fe001cd3c1a19f38f30c83cdc2e8399f
DIFF: https://github.com/llvm/llvm-project/commit/34c83399fe001cd3c1a19f38f30c83cdc2e8399f.diff
LOG: [flang][OpenMP] Update comments, NFC (#191709)
Some comments in openmp-utils.cpp became outdated after the code had
changed.
Added:
Modified:
flang/include/flang/Semantics/openmp-utils.h
flang/lib/Semantics/openmp-utils.cpp
Removed:
################################################################################
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