Debian Codegraph @

clang-tools-extra/docs/clang-tidy/checks/misc/no-recursion.rst

raw
1 .. title:: clang-tidy - misc-no-recursion
2
3 misc-no-recursion
4 =================
5
6 Finds strongly connected functions (by analyzing the call graph for
7 SCC's (Strongly Connected Components) that are loops),
8 diagnoses each function in the cycle,
9 and displays one example of a possible call graph loop (recursion).
10
11 References:
12
13 * CERT C++ Coding Standard rule `DCL56-CPP. Avoid cycles during initialization of static objects <https://wiki.sei.cmu.edu/confluence/display/cplusplus/DCL56-CPP.+Avoid+cycles+during+initialization+of+static+objects>`_.
14 * JPL Institutional Coding Standard for the C Programming Language (JPL DOCID D-60411) rule `2.4 Do not use direct or indirect recursion`.
15 * OpenCL Specification, Version 1.2 rule `6.9 Restrictions: i. Recursion is not supported. <https://www.khronos.org/registry/OpenCL/specs/opencl-1.2.pdf>`_.
16
17 Limitations:
18
19 * The check does not handle calls done through function pointers
20 * The check does not handle C++ destructors