Array size in QualType

How can I get size of arrays from QualType object?

Thanks in advance

For constant sized arrays (the most common case), dyn_cast to
ConstantArrayType and use ConstantArrayType::getSize. For the others,
look at the other subclasses of ArrayType.


dyn_cast won't look through typedefs. Use Context::getAs*ArrayType() to get at the appropriate array type, looking through typedefs.

  - Doug