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

Predicate getMaxIndirectionsForType

Gets the maximum number of indirections a glvalue of type type can have. For example:

  • If type = int, the result is 1
  • If type = MyStruct, the result is 1
  • If type = char*, the result is 2

Import path

int getMaxIndirectionsForType(Type type)