[flang] Added grammar for teams directive to semantic checks
authorDavid Truby <david.truby@arm.com>
Thu, 19 Sep 2019 09:02:35 +0000 (10:02 +0100)
committerDavid Truby <david.truby@arm.com>
Thu, 19 Sep 2019 09:02:35 +0000 (10:02 +0100)
Original-commit: flang-compiler/f18@1cee26516b39824523b4ec8c44a076d6a3f56e25
Reviewed-on: https://github.com/flang-compiler/f18/pull/750

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

index 45bfdbd..cbd90df 100644 (file)
@@ -404,6 +404,13 @@ void OmpStructureChecker::Enter(const parser::OpenMPBlockConstruct &x) {
         OmpClause::DEVICE, OmpClause::DEFAULTMAP, OmpClause::NOWAIT};
     SetContextAllowedOnce(allowedOnce);
   } break;
+  // 2.10.7 teams-clause -> num-teams-clause |
+  //                        thread-limit-clause |
+  //                        default-clause |
+  //                        private-clause |
+  //                        firstprivate-clause |
+  //                        shared-clause |
+  //                        reduction-clause
   case parser::OmpBlockDirective::Directive::Teams: {
     PushContext(beginDir.source, OmpDirective::TEAMS);
     OmpClauseSet allowed{OmpClause::PRIVATE, OmpClause::FIRSTPRIVATE,