================ @@ -13279,6 +13284,18 @@ def err_sycl_entry_point_return_type : Error< def err_sycl_entry_point_deduced_return_type : Error< "the %0 attribute only applies to functions with a non-deduced 'void' return" " type">; +def note_sycl_runtime_defect : Note< + "this error is due to a defect in SYCL runtime header files; please report" ---------------- tahonermann wrote:
I'm happy to rephrase the note. The difficulty is finding wording that is non-specific with respect to the particular issue since that can vary and we don't have the original context available at the point where the note is added to do much customization. The added test illustrates attachment of the note for the following errors/warnings (there are likely other cases; these correspond to everything I could think of to test). - `use of undeclared identifier 'sycl_kernel_launch'` - `'sycl_kernel_launch' does not refer to a template` - `no matching function for call to 'sycl_kernel_launch'` - `no matching function for call to object of type 'XXX'` - `template argument for non-type template parameter must be an expression` - `'operator()' is a private member of 'XXX'` - `reference to 'sycl_kernel_launch' is ambiguous` - `call to 'sycl_kernel_launch' is ambiguous` - `call to non-static member function without an object argument` - `explicit qualification required to use member 'sycl_kernel_launch' from dependent base class` - `call to deleted constructor of 'XXX'` - `call to function 'sycl_kernel_launch' that is neither visible in the template definition nor found by argument-dependent lookup` - `use of member 'sycl_kernel_launch' found via unqualified lookup into dependent bases of class templates is a Microsoft extension` I just realized that the note is attached to a warning in some cases, so the "this error is" part of the existing note is inaccurate. In all cases, the context is an implicit call to a `sycl_kernel_launch` function or function object, so the note can be customized for that situation if desired. How does the following sound (other messages shown for context)? ``` error: no matching function for call to 'sycl_kernel_launch' note: this issue indicates a problem with the SYCL runtime header files; please consider reporting this to your SYCL runtime provider note: in implicit call to 'sycl_kernel_launch' with template argument 'KN' and function arguments (lvalue of type 'const char[12]', xvalue of type 'KT') required here ``` The order of the two notes can be trivially reversed if desired. I have a slight preference for the order shown above, but can go either way on it. https://github.com/llvm/llvm-project/pull/152403 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
