================
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef<const OpenACCClause *>
ExistingClauses,
// The parser has ensured that we have a proper condition expr, so there
// isn't really much to do here.
- // TODO OpenACC: When we implement 'self', this clauses causes us to
- // 'ignore' the self clause, so we should implement a warning here.
+ // If the 'if' clause is true, it makes the 'self' clause have no effect,
+ // diagnose that here.
+ // TODO OpenACC: When we add these two to other constructs, we might not
+ // want to warn on this (for example, 'update').
+ const auto *Itr =
+ llvm::find_if(ExistingClauses, [](const OpenACCClause *C) {
+ return C->getClauseKind() == OpenACCClauseKind::Self;
+ });
----------------
alexey-bataev wrote:
```suggestion
llvm::find_if(ExistingClauses, IsaPred<OpenACCSelfClause>);
```
???
https://github.com/llvm/llvm-project/pull/88760
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits