No. <br><br>     int arr[3] = { 1, 2, 3 }<div><div><br>still get a ConstantArrayType.<br><br>Actually, if there's no explict size, RecursiveASTVisitor::VisitIncompleteArrayType will get called, but in this function context, i can not get the source location (because the argument to VisitIncompleteArrayType is only a type, not a stmt). <br><br>Thanks<br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "Sean Silva"<silvas@purdue.edu>;</div><div><b>Date: </b> Sun, Jan 6, 2013 04:09 PM</div><div><b>To: </b> "kevinlynx"<kevinlynx@gmail.com>; <wbr></div><div><b>Cc: </b> "cfe-dev"<cfe-dev@cs.uiuc.edu>; <wbr></div><div><b>Subject: </b> Re: [cfe-dev] can we know if an array definition has an explicit size ??</div></div><div><br></div>You can probably check that it is a ConstantArrayType<br><http://clang.llvm.org/doxygen/classclang_1_1ConstantArrayType.html>.<br><br>-- Sean Silva<br><br>On Sun, Jan 6, 2013 at 1:10 AM, kevinlynx <kevinlynx@gmail.com> wrote:<br>> say,<br>><br>>     int arr[] = { 1, 2, 3 }<br>><br>> here `arr` size is determined by the initializer expression automatically,<br>> but how to know this ? I implement `RecursiveASTVisitor::VisitVarDecl` and<br>> get a `VarDecl` object.<br>><br>> Thanks<br>><br>><br>><br>> _______________________________________________<br>> cfe-dev mailing list<br>> cfe-dev@cs.uiuc.edu<br>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br>><br></div>