================
@@ -2882,6 +2882,13 @@ StmtResult 
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
           /*ReadDirectiveWithinMetadirective=*/true);
       break;
     }
+    // If no match is found and no otherwise clause is present, skip
+    // OMP5.2 Chapter 7.4: If no otherwise clause is specified the effect is as
+    // if one was specified without an associated directive variant.
+    if (BestIdx == -1 && Idx == 1) {
+      ConsumeAnnotationToken();
+      return StmtEmpty();
+    }
----------------
zahiraam wrote:

In all cases I am seeing, at this point `Tok=annot_pragma_openmp_end` and 
`NextToken = kw_for`. Asserting here would not work! But doesn't it make sense 
to have the `kw_for` right at the end of the pragma?


https://github.com/llvm/llvm-project/pull/127113
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to