We should generalize the handling of dependent expressions from the
alignment attributes to deal with this case too.
Richard, as far as I know, alignment attributes only appertain to variables or typedefs (which both have AST nodes). I don't think we can generalize this approach for vector_size attribute as it appertains to types (which do not have AST nodes).
What about creating a new property for VectorType that would state that this vector type is dependent (dependent vector types are vector types with dependent base types and/or dependent size expressions)? It seems to be somewhat more appropriate to me.
What do you think?
And as a workaround on older version. The solution from https://stackoverflow.com/a/48377726/904262 seems to work if you can use a typedef. The resulting vector type seems to have the correct layout and C++ name mangling so I assume it's the correct type...