[cfe-dev] traverse by VisitArraySubscriptExpr

Rambo hunanlwm at sina.cn
Tue Jan 1 05:49:02 PST 2013


Hello,

I use VisitArraySubscriptExpr(Expr *E) to traverse all ArraySubscriptExpr in
the follow program,but ti is always have one failed to get.In this,I can't
get *a[i]* .Can I have your attention and tell me why?The program is
followed,thank you!

#include<stdio.h>
bool conver(int a[],int b[]);
int main()
{
  int i;
  int a[10];
  int num[5]={1,2,3,4,5};
  if(conver(a,num))
    for (i = 0; i <5; i++)
      printf("%d",*a[i]*);
  return 1;
}

bool conver(int d[],int b[])
{
   int i;
   int c[5];
   for(i=0;i<5;i++)
    {
      d[i]=b[i];
      c[i]=b[i];
     }
   return 1;
}




--
View this message in context: http://clang-developers.42468.n3.nabble.com/traverse-by-VisitArraySubscriptExpr-tp4029279.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list