Anastasia added a comment. In D60454#1488348 <https://reviews.llvm.org/D60454#1488348>, @rjmccall wrote:
> I think it would be more reasonable to just change `getDeclLanguageLinkage` > to check for a kernel function. I tried to change `getDeclLanguageLinkage` only but Sema calls `isInExternCContext` separately while giving diagnostics. `getDeclLanguageLinkage` also calls it through `isFirstInExternCContext`. So it seems we just need to check in `isInExternCContext` and that is a common part for all various program paths. Do you agree? ================ Comment at: lib/AST/Decl.cpp:2940 + if (hasAttr<OpenCLKernelAttr>()) + return true; return isDeclExternC(*this); ---------------- rjmccall wrote: > Both of these changes should be unnecessary because they ultimately defer to > `isInExternCContext`. > > I assume that OpenCL bans making a class member function a kernel? > I assume that OpenCL bans making a class member function a kernel? Yep, that's right! I am adding a diagnostic in this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60454/new/ https://reviews.llvm.org/D60454 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits