@@ -1279,9 +1279,6 @@ TYPE_PARSER(sourced(construct<OmpClauseList>(
1279
1279
// 2.1 (variable | /common-block/ | array-sections)
1280
1280
TYPE_PARSER(construct<OmpObjectList>(nonemptyList(Parser<OmpObject>{})))
1281
1281
1282
- TYPE_PARSER(sourced(construct<OmpErrorDirective>(
1283
- verbatim("ERROR"_tok), Parser<OmpClauseList>{})))
1284
-
1285
1282
// --- Parsers for directives and constructs --------------------------
1286
1283
1287
1284
static inline constexpr auto IsDirective(llvm::omp::Directive dir) {
@@ -1368,13 +1365,19 @@ struct LooselyStructuredBlockParser {
1368
1365
}
1369
1366
};
1370
1367
1371
- TYPE_PARSER(sourced(construct<OmpNothingDirective>("NOTHING" >> ok)))
1368
+ TYPE_PARSER(construct<OmpErrorDirective>(
1369
+ predicated(Parser<OmpDirectiveName>{},
1370
+ IsDirective(llvm::omp::Directive::OMPD_error)) >=
1371
+ Parser<OmpDirectiveSpecification>{}))
1372
1372
1373
- TYPE_PARSER(sourced(construct<OpenMPUtilityConstruct>(
1374
- sourced(construct<OpenMPUtilityConstruct>(
1375
- sourced(Parser<OmpErrorDirective>{}))) ||
1376
- sourced(construct<OpenMPUtilityConstruct>(
1377
- sourced(Parser<OmpNothingDirective>{}))))))
1373
+ TYPE_PARSER(construct<OmpNothingDirective>(
1374
+ predicated(Parser<OmpDirectiveName>{},
1375
+ IsDirective(llvm::omp::Directive::OMPD_nothing)) >=
1376
+ Parser<OmpDirectiveSpecification>{}))
1377
+
1378
+ TYPE_PARSER( //
1379
+ sourced(construct<OpenMPUtilityConstruct>(Parser<OmpErrorDirective>{})) ||
1380
+ sourced(construct<OpenMPUtilityConstruct>(Parser<OmpNothingDirective>{})))
1378
1381
1379
1382
TYPE_PARSER(construct<OmpMetadirectiveDirective>(
1380
1383
predicated(Parser<OmpDirectiveName>{},
0 commit comments