[clang] [Clang][OpenMP 6.0] Support positional arguments in `adjust_args` clause (PR #225081)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 17:50:04 PDT 2026


================
@@ -4790,6 +4806,110 @@ bool Parser::ParseOpenMPReservedLocator(OpenMPClauseKind Kind,
   return false;
 }
 
+bool Parser::ParseOpenMPAdjustArgsBound(OMPAdjustArgsItem::Bound &Bound) {
+  // 'omp_num_args' is recognised by spelling: OpenMP 6.0 [5.2.1] gives it no
+  // declaration, so it is never looked up.
+  if (Tok.isNot(tok::identifier) ||
+      !Tok.getIdentifierInfo()->isStr("omp_num_args")) {
+    ExprResult E = ParseAssignmentExpression();
+    if (E.isInvalid())
----------------
alexey-bataev wrote:

```suggestion
    E = Actions.ActOnFinishFullExpr(E.get(), E.get()->getExprLoc(), /*DiscardedValue=*/false);
    if (E.isInvalid())
```

https://github.com/llvm/llvm-project/pull/225081


More information about the cfe-commits mailing list