[flang-commits] [flang] [llvm] [Flang][OpenMP]Add parsing support for DISPATCH construct (PR #121982)
via flang-commits
flang-commits at lists.llvm.org
Fri Jan 24 10:25:56 PST 2025
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 bda39a6067833c9353adbc42bddb1b5808bcf44b 0ba34fa5954e19fde27070ad2770f1c0c8aaf981 --extensions h,cpp -- flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Lower/OpenMP/OpenMP.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/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index dc20bc2ec1..78962db8a8 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -4783,8 +4783,8 @@ struct OpenMPConstruct {
std::variant<OpenMPStandaloneConstruct, OpenMPSectionsConstruct,
OpenMPSectionConstruct, OpenMPLoopConstruct, OpenMPBlockConstruct,
OpenMPAtomicConstruct, OpenMPDeclarativeAllocate, OpenMPDispatchConstruct,
- OpenMPUtilityConstruct, OpenMPExecutableAllocate, OpenMPAllocatorsConstruct,
- OpenMPCriticalConstruct>
+ OpenMPUtilityConstruct, OpenMPExecutableAllocate,
+ OpenMPAllocatorsConstruct, OpenMPCriticalConstruct>
u;
};
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index e14a5a35fb..c7ad9cc085 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -1759,8 +1759,8 @@ void OmpStructureChecker::Enter(const parser::OpenMPDispatchConstruct &x) {
auto it{block.begin()};
bool passChecks{false};
- if (const parser::AssignmentStmt *assignStmt{
- parser::Unwrap<parser::AssignmentStmt>(*it)}) {
+ if (const parser::AssignmentStmt *
+ assignStmt{parser::Unwrap<parser::AssignmentStmt>(*it)}) {
if (parser::Unwrap<parser::FunctionReference>(assignStmt->t)) {
passChecks = true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/121982
More information about the flang-commits
mailing list