================
@@ -198,3 +198,12 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr 
&AL) {
 
   handleSimpleAttribute<SYCLKernelAttr>(*this, D, AL);
 }
+
+void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) {
+  ParsedType PT = AL.getTypeArg();
+  TypeSourceInfo *TSI = nullptr;
+  (void)SemaRef.GetTypeFromParser(PT, &TSI);
+  assert(TSI && "no type source info for attribute argument");
----------------
tahonermann wrote:

The attribute parser should have already validated that there was a single 
argument that named a type. Error handling for non-type arguments is exercised 
by `clang/test/SemaSYCL/sycl-kernel-entry-point-attr-grammar.cpp`. Diagnostics 
for types that are valid for use as kernel names will be in the next PR (see 
currently staged changes 
[here](https://github.com/tahonermann/llvm-project/compare/sycl-upstream-fe-pr1...tahonermann:llvm-project:sycl-upstream-fe-pr2).

https://github.com/llvm/llvm-project/pull/111389
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to