================
@@ -3231,14 +3230,27 @@ OMPClause
*Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
bool WrongDirective = false;
unsigned OMPVersion = Actions.getLangOpts().OpenMP;
- // Check if clause is allowed for the given directive.
- if (CKind != OMPC_unknown &&
- !isAllowedClauseForDirective(DKind, CKind, getLangOpts().OpenMP)) {
- Diag(Tok, diag::err_omp_unexpected_clause)
- << getOpenMPClauseName(CKind)
- << getOpenMPDirectiveName(DKind, OMPVersion);
- ErrorFound = true;
- WrongDirective = true;
+ auto checkClauseValid = [&](OpenMPDirectiveKind D, OpenMPClauseKind C) {
----------------
alexey-bataev wrote:
```suggestion
auto CheckClauseValid = [&](OpenMPDirectiveKind D, OpenMPClauseKind C) {
```
https://github.com/llvm/llvm-project/pull/214728
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits