[clang] [OpenMP] Support for `nothing` in `metadirective` (PR #73690)

Deepak Eachempati via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 13:42:00 PST 2023


================
@@ -12,7 +12,6 @@ int mixed() {
     x=d;
   }
 
-// expected-error at +2 {{#pragma omp nothing' cannot be an immediate substatement}}
----------------
dreachem wrote:

As I understand it, the `nothing` directive is not the equivalent of a null statement. It is an "ignore me" directive.

With OpenMP support, this:

```
if (x)
    #pragma omp nothing
f();
```

should be transformed to this (i.e., the nothing directive should simply be ignored):

```
if (x)
f();
```

If we are transforming it into a null statement, that is wrong.

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


More information about the cfe-commits mailing list