Hahnfeld added a comment.

In https://reviews.llvm.org/D30135#681354, @ABataev wrote:

> Not sure that this is better because at first, we need to be sure that this 
> nesting is allowed. Why do we need to perform some additional analysis if 
> nesting is not allowed at all?


`CheckNestingOfRegions` uses `CancelRegion` to determine whether cancel and 
cancellation point may be nested inside the parent construct. However with the 
current code, `CancelRegion` would only be checked afterwards.

  #pragma omp parallel
    {
  #pragma omp cancellation point unknown
    }

therefore produces `region cannot be closely nested inside 'parallel' region`. 
After this change, it says `one of 'for', 'parallel', 'sections' or 'taskgroup' 
is expected` as in the test case which is better IMO.

Should I try to improve the summary to explain that?


https://reviews.llvm.org/D30135



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

Reply via email to