[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri May 30 06:33:37 PDT 2025
================
@@ -3541,7 +3541,7 @@ bool FunctionDecl::isExternC() const {
}
bool FunctionDecl::isInExternCContext() const {
- if (hasAttr<OpenCLKernelAttr>())
+ if (hasAttr<DeviceKernelAttr>() && getASTContext().getLangOpts().OpenCL)
----------------
erichkeane wrote:
Is this really the same thing? Do we prevent enabling multiple kernel-defining languages at the same time? Should this instead check spelling?
https://github.com/llvm/llvm-project/pull/137882
More information about the cfe-commits
mailing list