[llvm-branch-commits] [clang] [llvm] [clang][OpenMP] Use different ids for block and s/a ORDERED directive (PR #214728)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 7 08:20:22 PDT 2026


================
@@ -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


More information about the llvm-branch-commits mailing list