================
@@ -2516,6 +2549,24 @@ StmtResult 
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
   StmtResult Directive = StmtError();
   bool HasAssociatedStatement = true;
 
+  // Check if it is extension directive.
+  // Extension directives must have extension directives
+  // enabled and must use the ompx sentinel
+  if (isExtensionDirective(DKind)) {
+    if (!isOmpx)
+      Diag(Loc, diag::err_omp_extension_without_ompx)
+          << getOpenMPDirectiveName(DKind);
+    else if (!getLangOpts().OpenMPExtensions) {
----------------
alexey-bataev wrote:

Enclose substatement in braces

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

Reply via email to