[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 06:23:51 PST 2025


================
@@ -68,15 +70,15 @@ int fun(int arg) {
       {}
 #pragma omp target map(mapper(aa :vv)                                   // expected-error {{use of undeclared identifier 'aa'}} expected-error {{expected ')'}} expected-error {{call to undeclared function 'mapper'}} expected-note {{to match this '('}}
       {}
-#pragma omp target map(mapper(ab) :vv)                                  // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :vv)                                  // omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error {{missing map type}} omp51-simd-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
       {}
-#pragma omp target map(mapper(ab) :arr[0:2])                            // expected-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
+#pragma omp target map(mapper(ab) :arr[0:2])                            // omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error {{missing map type}} omp51-simd-error {{missing map type}} expected-error {{cannot find a valid user-defined mapper for type 'struct vec' with name 'ab'}}
       {}
-#pragma omp target map(mapper(aa) :vv)                                  // expected-error {{missing map type}}
+#pragma omp target map(mapper(aa) :vv)                                  // omp50-error {{missing map type}} omp51-error {{missing map type}} omp52-error {{missing map type}} omp51-simd-error {{missing map type}}
----------------
zahiraam wrote:

The reason I made this change is because I added `RUN` line 4 at the test. When `fopenmp-version=60` we are not expecting a `missing map type` error, see (https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseOpenMP.cpp#L4833).

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


More information about the cfe-commits mailing list