Question on __attribute__((vector_size)) and templates

Hi Richard, Aaron,

I have a question regarding issue described in http://llvm.org/PR15730 and http://llvm.org/PR16986.
In comment 1 of PR16986 Richard said:
  >> We should generalize the handling of dependent expressions from the alignment attributes to deal with this case too.
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.
This will be somewhat similat to the way ExtVectorType and DependentSizedExtVectorType are treated.

What do you think?

Thank you,
Alexey Frolov

Hi Richard, Aaron,

This is a kind reminder if case this thread got forgotten.
Any thoughts on this?

Thank you,
Alexey Frolov

The direction I was thinking of was more like this:

* Change AttributedTypeLoc to store an Attr* rather than an Expr* so we
can reuse the autogenerated Attr instantiation code
* If the alignment of the vector is dependent, make the equivalent type of
the corresponding AttributedType be DependentTy
* Remove DependentSizedExtVectorType