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

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

import semmle.code.cpp.ir.dataflow.internal.SsaInternalsCommon
int getMaxIndirectionsForType(Type type)