[clang] [llvm] [Clang][OpenMP] This is addition fix for #92210. (PR #94802)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 13:50:54 PDT 2024


================
@@ -8025,6 +8025,15 @@ class MappableExprsHandler {
       MapCombinedInfoTy StructBaseCurInfo;
       const Decl *D = Data.first;
       const ValueDecl *VD = cast_or_null<ValueDecl>(D);
+      bool HasMapBasePtr = false;
+      bool HasMapArraySec = false;
+      if (VD && VD->getType()->isAnyPointerType()) {
+        for (const auto &M : Data.second) {
+  HasMapBasePtr = any_of(M, [](const MapInfo &L) { return isa_and_present<DeclRefExpr>(L.VarRef); });
+    HasMapArraySec = any_of(M, [](const MapInfo &L) { return isa_and_present<ArraySectionExpr, ArraySubscriptExpr>(L.VarRef); });
+  if (HasMapBasePtr && HasMapArraySec)
+    break;
+      }
----------------
alexey-bataev wrote:

```suggestion
      }
      }
```

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


More information about the cfe-commits mailing list