[cfe-dev] Multi-Dimensional Arrays

Isaiah Norton isaiah.norton at gmail.com
Thu Oct 3 06:21:18 PDT 2013


You might want to have a look at how this is implemented in libclang; see
CXType.cpp and specifically clang_getArraySize and
clang_getArrayElementType.


On Mon, Sep 30, 2013 at 4:45 AM, Prateek Saxena <
thisisprateeksaxena at gmail.com> wrote:

> Hi,
>
>
>   I am looking towards writing a AST visitor using the RecursiveASTVisitor
> class. I am done with the simple variables and operators. However, now I am
> trying to write visitors for arrays.
>
> The problems I am facing is that how do I figure out the dimensionality of
> the arrays and the respective size of each dimension ?
>
> In the AST, the declaration is of the DeclStmt . How do I get the size and
> type information from the Decl object ?
> Is that information available in the Type class ? If not, what classes do
> I need to look at ?
>
> Regards,
> Prateek
>
> P.S : I know this might be too basic for the experts out here, but still
> any pointers will be appreciated,
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131003/6fabe4d9/attachment.html>


More information about the cfe-dev mailing list