From d31bdf1b33b13733968b91f2c8381dafe3d0cbc9 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 2 Dec 2025 09:04:38 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Expand GetOmpObjectList to all subclasses of OmpClause Use GetOmpObjectList instead of extracting the object list by hand. --- flang/include/flang/Parser/openmp-utils.h | 56 +++++++++++++++ flang/lib/Parser/openmp-utils.cpp | 45 +++---------- flang/lib/Semantics/check-omp-loop.cpp | 9 +-- flang/lib/Semantics/check-omp-structure.cpp | 75 +++++++++------------ flang/lib/Semantics/resolve-directives.cpp | 29 ++++---- 5 files changed, 117 insertions(+), 97 deletions(-) diff --git a/flang/include/flang/Parser/openmp-utils.h b/flang/include/flang/Parser/openmp-utils.h index b7d990c9e75d6..90dbe3f893130 100644 --- a/flang/include/flang/Parser/openmp-utils.h +++ b/flang/include/flang/Parser/openmp-utils.h @@ -14,6 +14,7 @@ #define FORTRAN_PARSER_OPENMP_UTILS_H #include "flang/Common/indirection.h" +#include "flang/Common/template.h" #include "flang/Parser/parse-tree.h" #include "llvm/Frontend/OpenMP/OMP.h" @@ -127,7 +128,62 @@ template struct IsStatement> { std::optional