ABataev added inline comments.

================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2953-2954
+            (!(isOpenMPTargetExecutionDirective(DKind) && Res &&
+               (*Res == OMPDeclareTargetDeclAttr::MT_Link ||
+                *Res == OMPDeclareTargetDeclAttr::MT_To)))) {
+          // Only check for data-mapping attribute and is_device_ptr here
----------------
ABataev wrote:
> Why comparing the value of `*Res` here if just comparing against all possible 
> values? This condition is always `true` if `Res` is true. I don't think we 
> need to map variables with `to` mapping.
Do we need to map `declare target to` vars at all?


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2846
+    // 1. the implicit behavior for aggregate is tofrom
+    // 2. it's a declare target link/to
+    if (IsAggregateOrDeclareTarget) {
----------------
Is this still true for `decalare target to` vars?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69204/new/

https://reviews.llvm.org/D69204



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to