[clang] [llvm] [Clang][OpenMP] Support expression semantics in target update fields with non-contiguous array sections (PR #176708)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 10:59:48 PST 2026


================
@@ -8057,11 +8057,23 @@ class MappableExprsHandler {
           if (!StrideExpr)
             return false;
 
+          assert(StrideExpr->getType()->isIntegerType() &&
+                 "Stride expression must be of integer type");
+
+          // If the stride involves member access or array subscript, it's
+          // non-contiguous.
+          const Expr *S = StrideExpr->IgnoreParenImpCasts();
+          if (isa<MemberExpr>(S) || isa<ArraySubscriptExpr>(S))
+            return true;
+
----------------
alexey-bataev wrote:

You don't need this, since you're checking for non-constant after that

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


More information about the cfe-commits mailing list