[clang] [Clang] Fix sema checks thinking kernels aren't kernels (PR #104460)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 08:43:19 PDT 2024
================
@@ -7147,7 +7147,9 @@ void Sema::ProcessDeclAttributeList(
// good to have a way to specify "these attributes must appear as a group",
// for these. Additionally, it would be good to have a way to specify "these
// attribute must never appear as a group" for attributes like cold and hot.
- if (!D->hasAttr<OpenCLKernelAttr>()) {
+ const FunctionType *FnTy = D->getFunctionType();
+ if (!D->hasAttr<OpenCLKernelAttr>() && FnTy &&
+ FnTy->getCallConv() != CallingConv::CC_AMDGPUKernelCall) {
----------------
arsenm wrote:
Is there no other representation before going straight to the calling conv? Also probably should have an isKernel helper somewhere
https://github.com/llvm/llvm-project/pull/104460
More information about the cfe-commits
mailing list