[clang] [Clang][Attr] Fix possible crash when trying to check for DeviceKernel spelling (PR #143546)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 10 11:18:20 PDT 2025


sarnex wrote:

> Do we observe the issue there because intel's fork used to add OpenCLKernelAttr implicitly in SemaSYCL?
Yes, since the attribute is created implicitly, there's no spelling to check so there's no `AttrName`.

I understand we can only reproduce the problem out-of-tree, but since it's just a `nullptr` check and in general the assumption in this code that `AttrName` is always available is wrong, I think it's okay to have the fix here.

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


More information about the cfe-commits mailing list