[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 5 11:53:02 PST 2026
================
@@ -898,6 +899,25 @@ static std::string convertCallArgsToString(Sema &S,
return Result;
}
+static std::string
+printCallArgsValueCategoryAndType(Sema &S, llvm::ArrayRef<const Expr *> Args) {
+ std::string Result;
+ llvm::raw_string_ostream OS(Result);
+ llvm::ListSeparator Comma;
+ OS << "(";
+ for (const Expr *Arg : Args) {
+ ExprValueKind EVK = Arg->getValueKind();
+ const char *ValueCategory =
+ (EVK == VK_LValue ? "lvalue"
----------------
AaronBallman wrote:
> These diagnostics are intended to help SYCL run-time library implementers. SYCL programmers will only see these diagnostics if the SYCL RT implementation is defective.
Thank you for clarifying this, that changes my opinion pretty significantly. :-)
Tom and I chatted about this a bit offline and I now am comfortable with a diagnostic (perhaps a note?) that includes things like the value category, isn't localizable, etc. Typical users won't run into this, it's intended to help our community members debug the implementation itself. Usually we'd put that sort of thing into clang-tidy, but that's not practical here. It might make sense to add something to the user's manual (in addition to the diagnostic text itself) telling the user the issue isn't with their code, it's with our code.
https://github.com/llvm/llvm-project/pull/152403
More information about the cfe-commits
mailing list