doru1004 added inline comments.

================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2703
+            OMPDeclareTargetDeclAttr::getDeviceType(
+                VariantFD->getMostRecentDecl());
+        if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host)
----------------
ABataev wrote:
> Why the most recent decl?
I believe that would retrieve the full information about the function since 
that's where the function is defined?


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2704
+                VariantFD->getMostRecentDecl());
+        if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host)
+          HasHostFunctionVariant = true;
----------------
ABataev wrote:
> Isuppose it must be `DevTy && *DevTy == OMPDeclareTargetDeclAttr::DT_Host`, 
> no?
Correct me if I'm wrong but if there's no device type associated with the 
function then it is a host function? For the second part of the condition, if 
there exists a DevTy associated with the function then it has to be DT_Host.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140155

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

Reply via email to