[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
Tue Sep 29 06:54:14 PDT 2026


================
@@ -7904,11 +7898,70 @@ static bool checkPreferTypeArgs(SemaOpenMP &S, const OMPInteropInfo &Info) {
   return true;
 }
 
+enum class OMPAdjustArgsVal { Known, Dependent, Invalid };
+
+/// Check one 'adjust_args' integer expression for the constant property plus
+/// either the positive or the non-negative property (OpenMP 6.0 [5.2.1]).
+static OMPAdjustArgsVal checkOMPAdjustArgsValue(SemaOpenMP &S, Expr *E,
+                                                bool StrictlyPositive,
+                                                llvm::APSInt &Result) {
+  if (E->isValueDependent() || E->isTypeDependent() ||
+      E->isInstantiationDependent())
----------------
alexey-bataev wrote:

```suggestion
  if (E->isInstantiationDependent())
```

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


More information about the cfe-commits mailing list