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

Member predicate BitField::getDeclaredNumBits

Gets the value which appeared after the colon in the bitfield declaration.

In most cases, this will give the same value as getNumBits. It will only differ when the value after the colon is larger than the size of the variable’s type. For example, given int32_t x : 1234, getNumBits will give 32, whereas getDeclaredNumBits will give 1234.

int getDeclaredNumBits()