[cfe-dev] Array size in QualType

Peter Collingbourne peter at pcc.me.uk
Mon Nov 8 05:13:48 PST 2010


On Mon, Nov 08, 2010 at 02:52:32PM +0700, Pisit Makpaisit wrote:
> How can I get size of arrays from QualType object?

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.

Thanks,
-- 
Peter



More information about the cfe-dev mailing list