@@ -611,6 +611,14 @@ TYPE_PARSER(sourced(construct<OmpToClause::Modifier>(
611611TYPE_PARSER(sourced(construct<OmpWhenClause::Modifier>( //
612612 Parser<OmpContextSelector>{})))
613613
614+ TYPE_PARSER(construct<OmpAppendArgsClause::OmpAppendOp>(
615+ "INTEROP" >> parenthesized(nonemptyList(Parser<OmpInteropType>{}))))
616+
617+ TYPE_PARSER(construct<OmpAdjustArgsClause::OmpAdjustOp>(
618+ "NOTHING" >> pure(OmpAdjustArgsClause::OmpAdjustOp::Value::Nothing) ||
619+ "NEED_DEVICE_PTR" >>
620+ pure(OmpAdjustArgsClause::OmpAdjustOp::Value::Need_Device_Ptr)))
621+
614622// --- Parsers for clauses --------------------------------------------
615623
616624/// `MOBClause` is a clause that has a
@@ -630,6 +638,10 @@ static inline MOBClause makeMobClause(
630638 }
631639}
632640
641+ TYPE_PARSER(construct<OmpAdjustArgsClause>(
642+ (Parser<OmpAdjustArgsClause::OmpAdjustOp>{} / ":"),
643+ Parser<OmpObjectList>{}))
644+
633645// [5.0] 2.10.1 affinity([aff-modifier:] locator-list)
634646// aff-modifier: interator-modifier
635647TYPE_PARSER(construct<OmpAffinityClause>(
@@ -653,6 +665,9 @@ TYPE_PARSER(construct<OmpAtomicDefaultMemOrderClause>(
653665TYPE_PARSER(construct<OmpCancellationConstructTypeClause>(
654666 OmpDirectiveNameParser{}, maybe(parenthesized(scalarLogicalExpr))))
655667
668+ TYPE_PARSER(construct<OmpAppendArgsClause>(
669+ nonemptyList(Parser<OmpAppendArgsClause::OmpAppendOp>{})))
670+
656671// 2.15.3.1 DEFAULT (PRIVATE | FIRSTPRIVATE | SHARED | NONE)
657672TYPE_PARSER(construct<OmpDefaultClause::DataSharingAttribute>(
658673 "PRIVATE" >> pure(OmpDefaultClause::DataSharingAttribute::Private) ||
@@ -901,6 +916,8 @@ TYPE_PARSER( //
901916 parenthesized(Parser<OmpAbsentClause>{}))) ||
902917 "ACQUIRE" >> construct<OmpClause>(construct<OmpClause::Acquire>()) ||
903918 "ACQ_REL" >> construct<OmpClause>(construct<OmpClause::AcqRel>()) ||
919+ "ADJUST_ARGS" >> construct<OmpClause>(construct<OmpClause::AdjustArgs>(
920+ parenthesized(Parser<OmpAdjustArgsClause>{}))) ||
904921 "AFFINITY" >> construct<OmpClause>(construct<OmpClause::Affinity>(
905922 parenthesized(Parser<OmpAffinityClause>{}))) ||
906923 "ALIGN" >> construct<OmpClause>(construct<OmpClause::Align>(
@@ -909,6 +926,8 @@ TYPE_PARSER( //
909926 parenthesized(Parser<OmpAlignedClause>{}))) ||
910927 "ALLOCATE" >> construct<OmpClause>(construct<OmpClause::Allocate>(
911928 parenthesized(Parser<OmpAllocateClause>{}))) ||
929+ "APPEND_ARGS" >> construct<OmpClause>(construct<OmpClause::AppendArgs>(
930+ parenthesized(Parser<OmpAppendArgsClause>{}))) ||
912931 "ALLOCATOR" >> construct<OmpClause>(construct<OmpClause::Allocator>(
913932 parenthesized(scalarIntExpr))) ||
914933 "AT" >> construct<OmpClause>(construct<OmpClause::At>(
@@ -1348,6 +1367,11 @@ TYPE_PARSER(construct<OmpInitializerClause>(
13481367 construct<OmpInitializerClause>(assignmentStmt) ||
13491368 construct<OmpInitializerClause>(Parser<OmpInitializerProc>{})))
13501369
1370+ // OpenMP 5.2: 7.5.4 Declare Variant directive
1371+ TYPE_PARSER(sourced(
1372+ construct<OmpDeclareVariantDirective>(verbatim("DECLARE VARIANT"_tok),
1373+ "(" >> maybe(name / ":"), name / ")", Parser<OmpClauseList>{})))
1374+
13511375// 2.16 Declare Reduction Construct
13521376TYPE_PARSER(sourced(construct<OpenMPDeclareReductionConstruct>(
13531377 verbatim("DECLARE REDUCTION"_tok),
@@ -1519,6 +1543,8 @@ TYPE_PARSER(
15191543 Parser<OpenMPDeclareSimdConstruct>{}) ||
15201544 construct<OpenMPDeclarativeConstruct>(
15211545 Parser<OpenMPDeclareTargetConstruct>{}) ||
1546+ construct<OpenMPDeclarativeConstruct>(
1547+ Parser<OmpDeclareVariantDirective>{}) ||
15221548 construct<OpenMPDeclarativeConstruct>(
15231549 Parser<OpenMPDeclarativeAllocate>{}) ||
15241550 construct<OpenMPDeclarativeConstruct>(
0 commit comments