[flang-commits] [flang] [flang][OpenMP] Use OmpDirectiveSpecification in utility directives (PR #159585)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Mon Sep 22 06:18:20 PDT 2025
================
@@ -1276,11 +1276,18 @@ TYPE_PARSER(sourced(construct<OmpClauseList>(
// 2.1 (variable | /common-block/ | array-sections)
TYPE_PARSER(construct<OmpObjectList>(nonemptyList(Parser<OmpObject>{})))
-TYPE_PARSER(sourced(construct<OmpErrorDirective>(
- verbatim("ERROR"_tok), Parser<OmpClauseList>{})))
-
// --- Parsers for directives and constructs --------------------------
+static inline constexpr auto IsDirective(llvm::omp::Directive dir) {
+ return [dir](const OmpDirectiveName &name) -> bool { return dir == name.v; };
+}
+
+static inline constexpr auto IsMemberOf(const DirectiveSet &dirs) {
----------------
kparzysz wrote:
Done in https://github.com/llvm/llvm-project/pull/159803.
https://github.com/llvm/llvm-project/pull/159585
More information about the flang-commits
mailing list