diff options
Diffstat (limited to 'flang/lib/Parser/openmp-parsers.cpp')
| -rw-r--r-- | flang/lib/Parser/openmp-parsers.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp index d70aaab82cba..76c949941001 100644 --- a/flang/lib/Parser/openmp-parsers.cpp +++ b/flang/lib/Parser/openmp-parsers.cpp @@ -912,7 +912,7 @@ TYPE_PARSER(construct<OmpNumTasksClause>( scalarIntExpr)) TYPE_PARSER( - construct<OmpObject>(designator) || construct<OmpObject>("/" >> name / "/")) + construct<OmpObject>(designator) || "/" >> construct<OmpObject>(name) / "/") // OMP 5.0 2.19.4.5 LASTPRIVATE ([lastprivate-modifier :] list) TYPE_PARSER(construct<OmpLastprivateClause>( @@ -1757,6 +1757,13 @@ TYPE_PARSER(construct<OpenMPSectionsConstruct>( Parser<OmpBeginSectionsDirective>{} / endOmpLine, Parser<OmpSectionBlocks>{}, Parser<OmpEndSectionsDirective>{} / endOmpLine)) +static bool IsExecutionPart(const OmpDirectiveName &name) { + return name.IsExecutionPart(); +} + +TYPE_PARSER(construct<OpenMPExecDirective>( + startOmpLine >> predicated(Parser<OmpDirectiveName>{}, IsExecutionPart))) + TYPE_CONTEXT_PARSER("OpenMP construct"_en_US, startOmpLine >> withMessage("expected OpenMP construct"_err_en_US, |
