Icohedron wrote:

In my opinion, we should just define `lit` without templates, thereby following 
Clang's overload resolution rules and allowing implicit vector truncation. 
Overload resolution and implicit vector truncation are behaviors that should be 
consistent across the language. To me, it feels wrong to have special-case 
behavior on language-defining features implemented/overridden on a per-function 
basis.

Implicit vector truncation is also an area that needs addressing as a problem 
with the language, rather than being a special-case behavior handled by each 
function's implementation. Again, a compiler warning would go a long way to 
addressing problems where implicit truncation may not be intended by the 
programmer.
```
warning: implicit truncation of vector type [-Wconversion]
```
Or maybe implicit truncation should be removed from the language entirely (for 
202y perhaps)?

If you can make the behavior consistent with DXC under all cases with some 
special implementation in hlsl_compat_overloads for 202x, then you can do that, 
but I don't think we should be writing an implementation that matches DXC now 
and then rewrite it entirely again when we swap to 202y that makes the language 
more consistent (which is one of our goals for HLSL's future, right?)

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