[cfe-dev] Recovering extent expressions

Timothy McClory tmcclory at udel.edu
Wed Sep 28 17:22:50 PDT 2011


Consider the program:

#define m 1
#define n 2

int a[m*n];
int main() {
   return a[0];
}

How can I determine whether or not an array extent is an expression of macro
constants, and how can I retrieve this expression?
During AST traversal, I encounter a VarDecl whose type is ConstantArrayType,
but the size of this type has already been reduced to single integer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110928/bee78368/attachment.html>


More information about the cfe-dev mailing list