================ @@ -3541,7 +3541,7 @@ bool FunctionDecl::isExternC() const { } bool FunctionDecl::isInExternCContext() const { - if (hasAttr<OpenCLKernelAttr>()) + if (hasAttr<DeviceKernelAttr>() && getASTContext().getLangOpts().OpenCL) ---------------- sarnex wrote:
Thanks for the review. In an ideal world we would just be able to use the fact it's been specified as a device kernel do to the checks but right now it's not that simple, one case is the multiple language like you mentioned. I tried OpenCL + SYCL and that worked, so there is some ambiguity there. Let me update these checks to use the spelling just to simplify this change. Thanks again. https://github.com/llvm/llvm-project/pull/137882 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits