[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Thu May 15 12:27:39 PDT 2025
================
@@ -42,47 +42,47 @@ float2 test_mad_element_type_mismatch(half2 p0, float2 p1) {
float2 test_builtin_mad_float2_splat(float p0, float2 p1) {
return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error at -1 {{all arguments to '__builtin_hlsl_mad' must be vectors}}
+ // expected-error at -1 {{arguments are of different types ('double' vs 'float2' (aka 'vector<float, 2>'))}}
----------------
farzonl wrote:
we should make __builtin_hlsl_mad `CustomTypeChecking`. I changed a bunch of these that were just float\half definitions. I left the ones that had ints because I wasn't as sure what to do, but this makes it more clear.
https://github.com/llvm/llvm-project/pull/138429
More information about the cfe-commits
mailing list