[clang] [llvm] [openmp] [Clang][OpenMP] Add `#pragma omp flatten` loop directive + `depth` clause (PR #206977)
Michael Kruse via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 03:10:31 PDT 2026
================
@@ -0,0 +1,143 @@
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++20 -fopenmp -fopenmp-version=61 -fsyntax-only -Wall -Wuninitialized -verify=expected,omp61 %s
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++20 -fopenmp -fopenmp-version=60 -fsyntax-only -Wall -Wuninitialized -verify=expected %s
----------------
Meinersbur wrote:
```suggestion
```
flatten is not valid OpenMP 6.0.
I hope we eventually get an infrastructure to reject directives based on the OpenMP version, not just clauses
https://github.com/llvm/llvm-project/pull/206977
More information about the cfe-commits
mailing list