@@ -611,6 +611,18 @@ TYPE_PARSER(sourced(construct<OmpToClause::Modifier>(
611611TYPE_PARSER(sourced(construct<OmpWhenClause::Modifier>( //
612612 Parser<OmpContextSelector>{})))
613613
614+ TYPE_PARSER(construct<OmpInteropType>(
615+ "TARGETSYNC" >> pure(OmpInteropType::Value::TargetSync) ||
616+ "TARGET" >> pure(OmpInteropType::Value::Target)))
617+
618+ TYPE_PARSER(construct<OmpAppendArgsClause::OmpAppendOp>(
619+ "INTEROP" >> parenthesized(nonemptyList(Parser<OmpInteropType>{}))))
620+
621+ TYPE_PARSER(construct<OmpAdjustArgsClause::OmpAdjustOp>(
622+ "NOTHING" >> pure(OmpAdjustArgsClause::OmpAdjustOp::Value::Nothing) ||
623+ "NEED_DEVICE_PTR" >>
624+ pure(OmpAdjustArgsClause::OmpAdjustOp::Value::NeedDevicePtr)))
625+
614626// --- Parsers for clauses --------------------------------------------
615627
616628/// `MOBClause` is a clause that has a
@@ -630,6 +642,10 @@ static inline MOBClause makeMobClause(
630642 }
631643}
632644
645+ TYPE_PARSER(construct<OmpAdjustArgsClause>(
646+ (Parser<OmpAdjustArgsClause::OmpAdjustOp>{} / ":"),
647+ Parser<OmpObjectList>{}))
648+
633649// [5.0] 2.10.1 affinity([aff-modifier:] locator-list)
634650// aff-modifier: interator-modifier
635651TYPE_PARSER(construct<OmpAffinityClause>(
@@ -653,6 +669,9 @@ TYPE_PARSER(construct<OmpAtomicDefaultMemOrderClause>(
653669TYPE_PARSER(construct<OmpCancellationConstructTypeClause>(
654670 OmpDirectiveNameParser{}, maybe(parenthesized(scalarLogicalExpr))))
655671
672+ TYPE_PARSER(construct<OmpAppendArgsClause>(
673+ parenthesized(nonemptyList(Parser<OmpAppendArgsClause::OmpAppendOp>{}))))
674+
656675// 2.15.3.1 DEFAULT (PRIVATE | FIRSTPRIVATE | SHARED | NONE)
657676TYPE_PARSER(construct<OmpDefaultClause::DataSharingAttribute>(
658677 "PRIVATE" >> pure(OmpDefaultClause::DataSharingAttribute::Private) ||
@@ -901,6 +920,8 @@ TYPE_PARSER( //
901920 parenthesized(Parser<OmpAbsentClause>{}))) ||
902921 "ACQUIRE" >> construct<OmpClause>(construct<OmpClause::Acquire>()) ||
903922 "ACQ_REL" >> construct<OmpClause>(construct<OmpClause::AcqRel>()) ||
923+ "ADJUST_ARGS" >> construct<OmpClause>(construct<OmpClause::AdjustArgs>(
924+ parenthesized(Parser<OmpAdjustArgsClause>{}))) ||
904925 "AFFINITY" >> construct<OmpClause>(construct<OmpClause::Affinity>(
905926 parenthesized(Parser<OmpAffinityClause>{}))) ||
906927 "ALIGN" >> construct<OmpClause>(construct<OmpClause::Align>(
@@ -909,6 +930,8 @@ TYPE_PARSER( //
909930 parenthesized(Parser<OmpAlignedClause>{}))) ||
910931 "ALLOCATE" >> construct<OmpClause>(construct<OmpClause::Allocate>(
911932 parenthesized(Parser<OmpAllocateClause>{}))) ||
933+ "APPEND_ARGS" >> construct<OmpClause>(construct<OmpClause::AppendArgs>(
934+ parenthesized(Parser<OmpAppendArgsClause>{}))) ||
912935 "ALLOCATOR" >> construct<OmpClause>(construct<OmpClause::Allocator>(
913936 parenthesized(scalarIntExpr))) ||
914937 "AT" >> construct<OmpClause>(construct<OmpClause::At>(
@@ -1342,6 +1365,11 @@ TYPE_PARSER(construct<OmpInitializerClause>(
13421365 construct<OmpInitializerClause>(assignmentStmt) ||
13431366 construct<OmpInitializerClause>(Parser<OmpInitializerProc>{})))
13441367
1368+ // OpenMP 5.2: 7.5.4 Declare Variant directive
1369+ TYPE_PARSER(sourced(
1370+ construct<OmpDeclareVariantDirective>(verbatim("DECLARE VARIANT"_tok),
1371+ "(" >> maybe(name / ":"), name / ")", Parser<OmpClauseList>{})))
1372+
13451373// 2.16 Declare Reduction Construct
13461374TYPE_PARSER(sourced(construct<OpenMPDeclareReductionConstruct>(
13471375 verbatim("DECLARE REDUCTION"_tok),
@@ -1513,6 +1541,8 @@ TYPE_PARSER(
15131541 Parser<OpenMPDeclareSimdConstruct>{}) ||
15141542 construct<OpenMPDeclarativeConstruct>(
15151543 Parser<OpenMPDeclareTargetConstruct>{}) ||
1544+ construct<OpenMPDeclarativeConstruct>(
1545+ Parser<OmpDeclareVariantDirective>{}) ||
15161546 construct<OpenMPDeclarativeConstruct>(
15171547 Parser<OpenMPDeclarativeAllocate>{}) ||
15181548 construct<OpenMPDeclarativeConstruct>(
0 commit comments