[flang-commits] [flang] [flang][OpenMP] Use OmpDirectiveSpecification in utility directives (PR #159585)
Jack Styles via flang-commits
flang-commits at lists.llvm.org
Fri Sep 19 07:33:45 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) {
----------------
Stylie777 wrote:
nit: There is no content change here, is it critical to move it or can we reduce the diff?
https://github.com/llvm/llvm-project/pull/159585
More information about the flang-commits
mailing list