[cfe-dev] Array with size of an Enum Constant
Douglas Gregor
dgregor at apple.com
Mon Aug 23 10:23:59 PDT 2010
On Aug 23, 2010, at 10:23 AM, Murat B wrote:
> Thanks for the reply Doug!
>
> I have following situation, I have a variable T of class Type which is the type of the array size expression.
>
> My function progress following way.
> ArrayType *AT = dyn_cast<ArrayType>(T);
> if (VariableArrayType::classof(AT)
> ......................
> else if (ConstantArrayType::classof(AT) {
> ConstantArrayType *CAT = cast<ConstantArrayType>(AT);
> }
>
> For the structure field the type will be ConstantArrayType. Can you tell me how I can get TypeSourceInfo from it.
As I said before, you need to get the TypeSourceInfo from the *field*, i.e., the FieldDecl.
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100823/265435f2/attachment.html>
More information about the cfe-dev
mailing list