================
@@ -7163,7 +7165,8 @@ void Sema::ProcessDeclAttributeList(
     } else if (const auto *A = D->getAttr<OpenCLIntelReqdSubGroupSizeAttr>()) {
       Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
       D->setInvalidDecl();
-    } else if (!D->hasAttr<CUDAGlobalAttr>()) {
+    } else if (!D->hasAttr<CUDAGlobalAttr>() &&
----------------
yxsamliu wrote:

This part checks amdgpu kernel attributes. I think we should move it inside the 
above if body and change it to
```
if (!D->hasAttr<CUDAGlobalAttr>() && !FnTy->getCallConv() != 
CallingConv::CC_AMDGPUKernelCall) {
//...
}
```
instead of using `else if`.

https://github.com/llvm/llvm-project/pull/104460
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to