[cfe-dev] Array Size Information of the Outermost Dimension in ParamValDecl in AST

Tingyuan LIANG via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 1 02:22:06 PDT 2019


Dear all,

    Hi! I am trying to extracting the size of array from ParamValDecl in AST but I notice the following situation:
    The type of an array “int A[50][100]” in the function interface in source code will turn out to be "int (*)[100]" in AST, which means that I lose the information of the outermost dimension, i.e. the number "50".
    I wonder how I can get the size of the outermost dimension of the array with Clang AST visitor, except processing the string of source code or implementing a specific parser.
    THANKS a lot in advance for your time and patience!

Best regards,
------------------------------------------
Tingyuan LIANG
MPhil Student
Department of Electronic and Computer Engineering
The Hong Kong University of Science and Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190701/211dec8a/attachment.html>


More information about the cfe-dev mailing list