================
@@ -63,3 +62,25 @@ float8 test_convert_as_bfloat168_float8(ushort8 source) {
 float16 test_convert_as_bfloat1616_float16(ushort16 source) {
   return intel_convert_as_bfloat1616_float16(source);
 }
+
+struct S { int x; };
+
+void test_convert_bfloat16_as_ushort_invalid(float source, struct S s,
+                                             float4 f4) {
+  intel_convert_bfloat16_as_ushort(); // expected-error{{too few arguments to 
function call, expected 1, have 0}}
+  // expected-note@-1 0+{{'intel_convert_bfloat16_as_ushort' declared here}}
+  intel_convert_bfloat16_as_ushort(source, source); // expected-error{{too 
many arguments to function call, expected 1, have 2}}
+  // expected-note@-1 0+{{'intel_convert_bfloat16_as_ushort' declared here}}
+  intel_convert_bfloat16_as_ushort(s); // expected-error{{passing '__private 
struct S' to parameter of incompatible type 'float'}}
----------------
AaronBallman wrote:

Asking out of pure ignorance on my part, is the `__private` part of the 
diagnostic expected?

https://github.com/llvm/llvm-project/pull/199968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to