[flang] [llvm] [flang][OpenMP] Parsing support for iterator modifiers in FROM and TO (PR #114593)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 12:21:46 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 339c788fd0b1427153db287883d276e279073820 3e45edce13f05bbda4f146a03999cad46216df6d --extensions h,cpp -- flang/include/flang/Evaluate/check-expression.h flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Lower/OpenMP/ClauseProcessor.cpp flang/lib/Lower/OpenMP/Clauses.cpp flang/lib/Parser/openmp-parsers.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h flang/lib/Semantics/resolve-directives.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Evaluate/check-expression.h b/flang/include/flang/Evaluate/check-expression.h
index 4a541d177c..49b64468ff 100644
--- a/flang/include/flang/Evaluate/check-expression.h
+++ b/flang/include/flang/Evaluate/check-expression.h
@@ -115,8 +115,8 @@ extern template std::optional<bool> IsContiguous(
const CoarrayRef &, FoldingContext &);
extern template std::optional<bool> IsContiguous(
const Symbol &, FoldingContext &);
-static inline std::optional<bool> IsContiguous(const SymbolRef &s,
- FoldingContext &c) {
+static inline std::optional<bool> IsContiguous(
+ const SymbolRef &s, FoldingContext &c) {
return IsContiguous(s.get(), c);
}
template <typename A>
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 4f7d0356f5..eb7edf24b6 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -301,22 +301,22 @@ private:
};
} // namespace
-std::optional<bool>
-OmpStructureChecker::IsContiguous(const parser::OmpObject &object) {
- return common::visit(
- common::visitors{
- [&](const parser::Name &x) {
- // Any member of a common block must be contiguous.
- return std::optional<bool>{true};
- },
- [&](const parser::Designator &x) {
- evaluate::ExpressionAnalyzer ea{context_};
- if (MaybeExpr maybeExpr{ea.Analyze(x)}) {
- return ContiguousHelper{context_}.Visit(*maybeExpr);
- }
- return std::optional<bool>{};
- },
- },
+std::optional<bool> OmpStructureChecker::IsContiguous(
+ const parser::OmpObject &object) {
+ return common::visit(common::visitors{
+ [&](const parser::Name &x) {
+ // Any member of a common block must be contiguous.
+ return std::optional<bool>{true};
+ },
+ [&](const parser::Designator &x) {
+ evaluate::ExpressionAnalyzer ea{context_};
+ if (MaybeExpr maybeExpr{ea.Analyze(x)}) {
+ return ContiguousHelper{context_}.Visit(
+ *maybeExpr);
+ }
+ return std::optional<bool>{};
+ },
+ },
object.u);
}
@@ -4164,8 +4164,8 @@ struct NameHelper {
};
} // namespace
-const parser::Name *
-OmpStructureChecker::GetObjectName(const parser::OmpObject &object) {
+const parser::Name *OmpStructureChecker::GetObjectName(
+ const parser::OmpObject &object) {
return NameHelper::Visit(object);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/114593
More information about the llvm-commits
mailing list