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
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>\.
-- 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.