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

say,

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.

Thanks

You can probably check that it is a ConstantArrayType
<http://clang.llvm.org/doxygen/classclang_1_1ConstantArrayType.html&gt;\.

-- Sean Silva

If the type in the type source info is not an IncompleteArrayType, that seems like a bug.

John.

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

John.