24 lines · plain
1.. title:: clang-tidy - misc-no-recursion2 3misc-no-recursion4=================5 6Finds strongly connected functions (by analyzing the call graph for7SCC's (Strongly Connected Components) that are loops),8diagnoses each function in the cycle,9and displays one example of a possible call graph loop (recursion).10 11References: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 Language15 (JPL DOCID D-60411) rule `2.4 Do not use direct or indirect recursion`.16* 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>`_.17 18 19Limitations20-----------21 22* The check does not handle calls done through function pointers23* The check does not handle C++ destructors24