Multi-dimensional arrays

Hello everybody

I would like to know how to access to all the dimensions of an array with more than one dimension from its Decl object
In other words, if I have the type "int[42][51]", I would like to get both the "42" and the "51".

I figured out how to do so with a single-dimension using an ASTContext, but not for multiple dimensions yet.

Best regards,

- Antoine

Use getAsConstantArrayType to get the ConstantArrayType* and extract the first dimension. Then, use getElementType() on the ConstantArrayType to get the element type, and use getAsConstantArrayType on that. Lather, rinse, repeat as needed.

That is obvious once you're told. Thank you very much !