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

Member predicate Field::isInitializable

Holds if the field can be initialized as part of an initializer list. For example, in:

struct S {
  unsigned int a : 5;
  unsigned int : 5;
  unsigned int b : 5;
};

Fields a and b are initializable, but the unnamed bitfield is not.

predicate isInitializable()