[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
Wed Dec 10 10:14:37 PST 2025


================
@@ -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:

This function doesn't actually print anything, so the name is a bit surprising. But I've got concerns with this approach as well.

1) We want all diagnostic text to be in the .td file (largely to ease folks who are translating diagnostics into other languages)
2) This is using standards terminology in an unhelpful way; value categories are not something we want to force users to reason about. Why is the value category even important?
3) I suspect this is going to be verbose in practice given how long C++ type names can be (and this scales with the number of arguments passe).

Can you help me understand how this information helps the user determine how to fix the reported issue? Maybe we don't need to print it at all?

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


More information about the cfe-commits mailing list