[flang] Added grammar comments for enter data and exit data directives

Original-commit: flang-compiler/f18@a1e6cded2f
Reviewed-on: https://github.com/flang-compiler/f18/pull/748
This commit is contained in:
David Truby 2019-09-18 10:12:57 +01:00
parent 5776003259
commit e0c15c4952
1 changed files with 10 additions and 2 deletions

View File

@ -550,7 +550,11 @@ void OmpStructureChecker::Enter(
PushContext(dir.source, OmpDirective::TASKYIELD);
} break;
case parser::OmpSimpleStandaloneDirective::Directive::TargetEnterData: {
// 2.10.2 target-enter-data
// 2.10.2 target-enter-data-clause -> if-clause |
// device-clause |
// map-clause |
// depend-clause |
// nowait-clause
PushContext(dir.source, OmpDirective::TARGET_ENTER_DATA);
OmpClauseSet allowed{OmpClause::MAP, OmpClause::DEPEND, OmpClause::NOWAIT};
SetContextAllowed(allowed);
@ -559,7 +563,11 @@ void OmpStructureChecker::Enter(
SetContextRequired({OmpClause::MAP});
} break;
case parser::OmpSimpleStandaloneDirective::Directive::TargetExitData: {
// 2.10.3 target-exit-data
// 2.10.3 target-enter-data-clause -> if-clause |
// device-clause |
// map-clause |
// depend-clause |
// nowait-clause
PushContext(dir.source, OmpDirective::TARGET_EXIT_DATA);
OmpClauseSet allowed{OmpClause::MAP, OmpClause::DEPEND, OmpClause::NOWAIT};
SetContextAllowed(allowed);