[Openmp-commits] [clang] [openmp] [llvm] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

Alexey Bataev via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 7 07:47:49 PST 2023


================
@@ -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) {
+      Diag(Loc, diag::warn_omp_extension_directive_not_enabled)
+          << getOpenMPDirectiveName(DKind);
----------------
alexey-bataev wrote:

I rather doubt there should be this check, better to enable ompx pragma handler only if getLangOpts().OpenMPExtensions is true.

https://github.com/llvm/llvm-project/pull/66919


More information about the Openmp-commits mailing list