[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 1 07:53:31 PST 2024


philnik777 wrote:


> @philnik777 - thank you for the patch at #68324

You're welcome!

FWIW I'd find a syntax like `_ExtVector<bool, 4>` better. The underscore and upper case to make it clear that it's non-standard and the angle bracket syntax since it's kind-of a template. This unfortunately doesn't map really nicely to anything native otherwise. Maybe think of it like
```c++
template <class T, unsigned N>
using _ExtVector __attribute__((ext_vector_type(N))) = T;
```
Then you'd actually use it as `_ExtVector<bool, 4>` in source code.
I don't think that would be significantly harder to parse.

https://github.com/llvm/llvm-project/pull/83584


More information about the cfe-commits mailing list