eandrews added a comment. This patch causes a regression.
To reproduce - `clang -cc1 -fsycl-is-device -triple spir64 test.cpp` // expected-note@+2 {{'bar<__float128>' defined here}} template <typename T> T bar() { return T(); }; void usage() { // expected-error@+2 {{'bar<__float128>' requires 128 bit size '__float128' type support, but target 'spir64' does not support it}} // expected-error@+1 {{'__float128' is not supported on this target}} auto malAutoTemp5 = bar<__float128>(); } template <typename name, typename Func> __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { kernelFunc(); // expected-note {{called by 'kernel_single_task<fake_kernel, (lambda at}} } int main() { kernel_single_task<class fake_kernel>([=]() { usage(); // expected-note {{called by 'operator()'}} }); return 0; } This test now fails due to an additional diagnostic generated at template definition. test.cpp:x:3: error: 'bar<__float128>' requires 128 bit size '__float128' type support, but target 'spir64' does not support it T bar() { return T(); }; ^ I looked at it briefly, and I believe the issue is call to `checkTypeSupport()` in `ActOnFinishFunctionBody()`. I tried deleting the call but it breaks tests (E.g. L26 in x86_64-no-x87.cpp). @asavonic Please take a look. I will be reverting the patch if this cannot be fixed soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98895/new/ https://reviews.llvm.org/D98895 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits