CodeQL library for C/C++
codeql/cpp-all 1.1.2-dev (changelog, source)

Member predicate PaddedType::wastedSpace

Gets the number of bits wasted in this struct definition; that is. the waste between fields plus any waste from trailing padding. Only the space wasted directly in this type is counted, not space wasted in nested structs. Note that for unions, the wasted space is simply the amount of trailing padding, as other fields are not laid out one after another, and hence there is no padding between them.

int wastedSpace(Architecture arch)