I can't get the defined size


This is some Program fragments for test:
section 1:
bool conver(int a[],int b[])
section 2:
int main()
   int a[10];
   int num[5]={1,2,3,4,5};
Now my problem is that I traverse them by some code as follows,i can't get
the defined size of array a and b.the reason is obvious,the section 1 is
traversed before section 2.I wonder someone can give me a better method to
break this trouble,thank you!

bool MyASTConsumer::HandleTopLevelDecl(DeclGroupRef d)
  typedef DeclGroupRef::iterator iter;
  for (iter b = d.begin(), e = d.end(); b != e; ++b)
  return true; // keep going

I am also looking to get defined size of array.

Using VisitDeclStmt(Stmt *s), I can get following info:
   Found DeclStmt
        decl statement: int dummy[5]
        identifier name = dummy
        type = int [5]

But how to get defined size?

Also using, VisitBinAssign(BinaryOperator *E) and
VisitArraySubscriptExpr(ArraySubscriptExpr* S), I can get following info:
    Found BinaryOperator
        Assignment Op = in B1
        RHS value: 10

        found array subscript expr
        identifier = arr
        index value: 9

But why I am getting RHS first for arr[9] = 10;? I should get first LHS
arr[9] and then RHS value 10, since Visit methods are called in pre-order
DFS manner as AST is traverse. Correct me if it is otherwise?

I am having same trouble when I have unary minus on LHS of a binary
operation (e.g. x = -1 + x;), then VisitUnaryMinus() is getting visited
after RHS? why it is so?

- Rajendra