CodeQL library for C/C++
codeql/cpp-all 1.1.0 (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)