[clang] [CUDA][HIP] ignore implicit host/device attr for override (PR #72815)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 19 17:28:48 PST 2023


================
@@ -1000,13 +1000,9 @@ void Sema::checkCUDATargetOverload(FunctionDecl *NewFD,
     // should have the same implementation on both sides.
     if (NewTarget != OldTarget &&
         ((NewTarget == CFT_HostDevice &&
-          !(LangOpts.OffloadImplicitHostDeviceTemplates &&
-            isCUDAImplicitHostDeviceFunction(NewFD) &&
-            OldTarget == CFT_Device)) ||
+          !isCUDAImplicitHostDeviceFunction(NewFD)) ||
----------------
Artem-B wrote:

This change was previously excluding device functions. Do we want/need to keep that check in place?
If it does need to be gone, then the comment above may need to be updated.

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


More information about the cfe-commits mailing list