| Issue |
161360
|
| Summary |
[Clang] bogus error about vector values of different size
|
| Labels |
clang:diagnostics
|
| Assignees |
|
| Reporter |
philnik777
|
With `-flax-vector-conversions=none`, clang rejects the following code:
```c++
template <class T>
using vec [[clang::ext_vector_type(4)]] = T;
auto test(vec<int> v, vec<const int> v2) {
return v == v2;
}
```
I'm not quite sure whether it's intended to work, but the diagnostic is definitely bogus:
```
<source>:6:12: error: cannot convert between vector values of different size ('vec<int>' (vector of 4 'int' values) and 'vec<const int>' (vector of 4 'const int' values))
6 | return v == v2;
| ~ ^ ~~
```
Both the element size and total vector size are identical.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs