<div><div>Consider the program:</div><div><br></div><div>#define m 1</div><div>#define n 2</div><div><br></div><div>int a[m*n];</div><div>int main() {</div><div>   return a[0];</div><div>}</div><div><br></div><div>How can I determine whether or not an array extent is an expression of macro constants, and how can I retrieve this expression?</div>
<div>During AST traversal, I encounter a VarDecl whose type is ConstantArrayType, but the size of this type has already been reduced to single integer. </div></div>