[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 12:46:50 PST 2022


doru1004 added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683
+        OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl());
+    if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host)
+      return true;
----------------
ABataev wrote:
> doru1004 wrote:
> > ABataev wrote:
> > > Do you have a test for `!DevTy` case? Maybe I'm missing it.
> > Yes it was the first test I added. The second one tests the second part of the condition.
> Hmm, but in this test we have *DevTy == OMPDeclareTargetDeclAttr::DT_Host, no?
I added a positive check of that condition too. No error messages to check for in that case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140155



More information about the cfe-commits mailing list