Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions flang/lib/Parser/openmp-parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,16 @@ TYPE_PARSER(sourced(construct<OmpErrorDirective>(

// --- 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) {
return [&dirs](const OmpDirectiveName &name) -> bool {
return dirs.test(llvm::to_underlying(name.v));
};
}

TYPE_PARSER(sourced(construct<OmpDirectiveName>(OmpDirectiveNameParser{})))

OmpDirectiveSpecification static makeFlushFromOldSyntax(Verbatim &&text,
Expand Down Expand Up @@ -1366,16 +1376,6 @@ TYPE_PARSER(sourced(construct<OpenMPUtilityConstruct>(
TYPE_PARSER(sourced(construct<OmpMetadirectiveDirective>(
verbatim("METADIRECTIVE"_tok), Parser<OmpClauseList>{})))

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) {
return [&dirs](const OmpDirectiveName &name) -> bool {
return dirs.test(llvm::to_underlying(name.v));
};
}

struct OmpBeginDirectiveParser {
using resultType = OmpDirectiveSpecification;

Expand Down