[cfe-dev] can we know if an array definition has an explicit size ??

John McCall rjmccall at apple.com
Wed Jan 9 16:40:53 PST 2013


On Jan 9, 2013, at 4:40 PM, John McCall <rjmccall at apple.com> wrote:
> On Jan 5, 2013, at 10:10 PM, kevinlynx <kevinlynx at gmail.com> wrote:
>>    int arr[] = { 1, 2, 3 }
>> 
>> here `arr` size is determined by the initializer expression automatically, but how to know this ? I implement `RecursiveASTVisitor::VisitVarDecl` and get a `VarDecl` object.
> 
> If the type in the type source info is not an IncompleteArrayType, that seems like a bug.

Oh, sorry, I somehow didn't see the rest of the conversation.

John.



More information about the cfe-dev mailing list