@@ -550,6 +550,17 @@ TYPE_PARSER(sourced(construct<OmpToClause::Modifier>(
550550TYPE_PARSER(sourced(construct<OmpWhenClause::Modifier>( //
551551 Parser<OmpContextSelector>{})))
552552
553+ TYPE_PARSER(construct<OmpInteropType>(
554+ "TARGETSYNC" >> pure(OmpInteropType::Value::TargetSync) ||
555+ "TARGET" >> pure(OmpInteropType::Value::Target)))
556+
557+ TYPE_PARSER(construct<OmpAppendArgsClause::OmpAppendOp>(
558+ "INTEROP" >> parenthesized(nonemptyList(Parser<OmpInteropType>{}))))
559+
560+ TYPE_PARSER(construct<OmpAdjustArgsClause::OmpAdjustOp>(
561+ "NOTHING" >> pure(OmpAdjustArgsClause::OmpAdjustOp::Value::Nothing) ||
562+ "NEED_DEVICE_PTR" >> pure(OmpAdjustArgsClause::OmpAdjustOp::Value::NeedDevicePtr)))
563+
553564// --- Parsers for clauses --------------------------------------------
554565
555566/// `MOBClause` is a clause that has a
@@ -569,12 +580,19 @@ static inline MOBClause makeMobClause(
569580 }
570581}
571582
583+ TYPE_PARSER(construct<OmpAdjustArgsClause>(
584+ (Parser<OmpAdjustArgsClause::OmpAdjustOp>{} / ":"),
585+ Parser<OmpObjectList>{}))
586+
572587// [5.0] 2.10.1 affinity([aff-modifier:] locator-list)
573588// aff-modifier: interator-modifier
574589TYPE_PARSER(construct<OmpAffinityClause>(
575590 maybe(nonemptyList(Parser<OmpAffinityClause::Modifier>{}) / ":"),
576591 Parser<OmpObjectList>{}))
577592
593+ TYPE_PARSER(construct<OmpAppendArgsClause>(
594+ parenthesized(nonemptyList(Parser<OmpAppendArgsClause::OmpAppendOp>{}))))
595+
578596// 2.15.3.1 DEFAULT (PRIVATE | FIRSTPRIVATE | SHARED | NONE)
579597TYPE_PARSER(construct<OmpDefaultClause::DataSharingAttribute>(
580598 "PRIVATE" >> pure(OmpDefaultClause::DataSharingAttribute::Private) ||
@@ -808,6 +826,8 @@ TYPE_PARSER("ABSENT" >> construct<OmpClause>(construct<OmpClause::Absent>(
808826 parenthesized(Parser<OmpAbsentClause>{}))) ||
809827 "ACQUIRE" >> construct<OmpClause>(construct<OmpClause::Acquire>()) ||
810828 "ACQ_REL" >> construct<OmpClause>(construct<OmpClause::AcqRel>()) ||
829+ "ADJUST_ARGS" >> construct<OmpClause>(construct<OmpClause::AdjustArgs>(
830+ parenthesized(Parser<OmpAdjustArgsClause>{}))) ||
811831 "AFFINITY" >> construct<OmpClause>(construct<OmpClause::Affinity>(
812832 parenthesized(Parser<OmpAffinityClause>{}))) ||
813833 "ALIGN" >> construct<OmpClause>(construct<OmpClause::Align>(
@@ -816,6 +836,8 @@ TYPE_PARSER("ABSENT" >> construct<OmpClause>(construct<OmpClause::Absent>(
816836 parenthesized(Parser<OmpAlignedClause>{}))) ||
817837 "ALLOCATE" >> construct<OmpClause>(construct<OmpClause::Allocate>(
818838 parenthesized(Parser<OmpAllocateClause>{}))) ||
839+ "APPEND_ARGS" >> construct<OmpClause>(construct<OmpClause::AppendArgs>(
840+ parenthesized(Parser<OmpAppendArgsClause>{}))) ||
819841 "ALLOCATOR" >> construct<OmpClause>(construct<OmpClause::Allocator>(
820842 parenthesized(scalarIntExpr))) ||
821843 "AT" >> construct<OmpClause>(construct<OmpClause::At>(
@@ -1209,6 +1231,11 @@ TYPE_PARSER(construct<OmpInitializerClause>(
12091231 construct<OmpInitializerClause>(Parser<OmpInitializerExpr>{}) ||
12101232 construct<OmpInitializerClause>(Parser<OmpInitializerProc>{})))
12111233
1234+ // OpenMP 5.2: 7.5.4 Declare Variant directive
1235+ TYPE_PARSER(sourced(construct<OmpDeclareVariantDirective>(
1236+ verbatim("DECLARE VARIANT"_tok),
1237+ "(" >> maybe(name / ":"), name / ")", Parser<OmpClauseList>{})))
1238+
12121239// 2.16 Declare Reduction Construct
12131240TYPE_PARSER(sourced(construct<OpenMPDeclareReductionConstruct>(
12141241 verbatim("DECLARE REDUCTION"_tok),
@@ -1380,6 +1407,8 @@ TYPE_PARSER(
13801407 Parser<OpenMPDeclareSimdConstruct>{}) ||
13811408 construct<OpenMPDeclarativeConstruct>(
13821409 Parser<OpenMPDeclareTargetConstruct>{}) ||
1410+ construct<OpenMPDeclarativeConstruct>(
1411+ Parser<OmpDeclareVariantDirective>{}) ||
13831412 construct<OpenMPDeclarativeConstruct>(
13841413 Parser<OpenMPDeclarativeAllocate>{}) ||
13851414 construct<OpenMPDeclarativeConstruct>(
0 commit comments