scitools.com

← Metric catalog

Recursive (Pointers) is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Recursive (Pointers)

API ID: IsRecursiveUsePtr
Languages: Any
Targets: Functions

Return 0, 1, or 2 for not recursive, directly recursive, or indirectly recursive

This is a batch metric. The first time it is called, it will scan the entire project to find all recursive functions. Future calls read from a cache.

This version is intended to more closely match the recursion checks in MISRA ( C 2004 C++ 2008 C 2012 C 2023 C++ 2023) and AUTOSAR. It does not include virtual calls and does follow functions passed as pointers. For a simpler version of the metric, use IsRecursive.