ABataev added a comment.

In D116637#3294361 <https://reviews.llvm.org/D116637#3294361>, @tianshilei1992 
wrote:

> @ABataev @jdoerfert I got a question about writing the test. `atomic compare` 
> is supported from 5.1. Basically we have three ways to guard those `atomic 
> compare` code:
>
> 1. Use macro `_OPENMP`. This pretty much works with one exception: we don't 
> set the macro for `-fopenmp-simd`. Then we cannot test `-fopenmp-simd`.
> 2. Use those `omp50-error` and `omp50-note` which are shown in this patch. 
> `-fopenmp-simd` can be tested now. However, it doesn't work with `-emit-pch`. 
> The compiler emits errors that `unexpected OpenMP clause 'compare' in 
> directive '#pragma omp atomic'` for the lower version tests. If we add 
> `-verify` to the `-emit-pch` line, then the pch will not be generated.
> 3. Put `atomic compare` tests in another file.
>
> For now only the 3rd method could work, but I'm not sure if there are ways to 
> work around the limitation in the first two approaches.

The second or the 3rd approach.
The tests should work with emit pch and include pch options, otherwise 
precompiled modules are broken. Need to test it too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116637/new/

https://reviews.llvm.org/D116637

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to