[flang] Added grammar comments for enter data and exit data directives
authorDavid Truby <david.truby@arm.com>
Wed, 18 Sep 2019 09:12:57 +0000 (10:12 +0100)
committerDavid Truby <david.truby@arm.com>
Fri, 27 Sep 2019 12:57:51 +0000 (13:57 +0100)
Original-commit: flang-compiler/f18@a1e6cded2f0c0af9fda8ea53ac8c6636843e07e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/748

flang/lib/semantics/check-omp-structure.cc

index 28f39cf..1a312a1 100644 (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);