can we know if an array definition has an explicit size ??


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.


You can probably check that it is a ConstantArrayType

-- Sean Silva

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.