================
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only 
-disable-llvm-passes -verify
+
+float4 test_no_second_arg(float p0) {
+  return lit(p0);
+  // expected-error@-1 {{no matching function for call to 'lit'}}
+  // expected-note@hlsl/hlsl_compat_overloads.h:* {{candidate function 
template not viable: requires 3 arguments, but 1 was provided}}
+}
+
+float4 test_no_third_arg(float p0) {
+  return lit(p0, p0);
+  // expected-error@-1 {{no matching function for call to 'lit'}}
+  // expected-note@hlsl/hlsl_compat_overloads.h:* {{candidate function 
template not viable: requires 3 arguments, but 2 were provided}}
+}
+
+float4 test_too_many_arg(float p0) {
+  return lit(p0, p0, p0, p0);
+  // expected-error@-1 {{no matching function for call to 'lit'}}
----------------
kmpeng wrote:

Code updated.

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

Reply via email to