================
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -finclude-default-header -triple 
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only 
-disable-llvm-passes -verify -verify-ignore-unexpected
+
+
+export uint4 test_asuint_too_many_arg(float p0, float p1) {
+  return __builtin_hlsl_elementwise_asuint(p0, p1);
+  // expected-error@-1 {{too many arguments to function call, expected 1, have 
2}}
+}
+
+
+export uint fn(double p1) {
+    return asuint(p1);
+    // expected-error@-1 {{passing 'double' to parameter of incompatible type 
'float'}}
+}
----------------
bogner wrote:

I suspect this test is failing because we won't actually get to the error 
handling on the builtin - since `asuint` has `float` and `int` overloads, this 
call should be ambiguous.

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

Reply via email to