[flang-commits] [flang] [llvm] [Flang][OpenMP][Sema] Adding parsing and semantic support for scan directive. (PR #102792)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Thu Aug 29 03:38:42 PDT 2024
================
@@ -1591,6 +1593,19 @@ bool OmpAttributeVisitor::Pre(
default:
break;
}
+ if (standaloneDir.v == llvm::omp::Directive::OMPD_scan) {
+ if ((std::get<parser::OmpClauseList>(x.t).v.size() != 1)) {
+ context_.Say(standaloneDir.source,
+ "Exactly one of `exclusive` or `inclusive` clause is expected"_err_en_US);
+ }
+ if (!parentContext ||
+ (!llvm::omp::scanAllowedSet.test(parentContext->directive))) {
----------------
skatrak wrote:
```suggestion
!llvm::omp::scanAllowedSet.test(parentContext->directive)) {
```
https://github.com/llvm/llvm-project/pull/102792
More information about the flang-commits
mailing list