mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
18 lines
417 B
Plaintext
18 lines
417 B
Plaintext
/**
|
|
* @id cpp/examples/mutualrecursion
|
|
* @name Mutual recursion
|
|
* @description Finds pairs of functions that call each other
|
|
* @tags function
|
|
* method
|
|
* recursion
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from Function m, Function n
|
|
where
|
|
exists(FunctionCall c | c.getEnclosingFunction() = m and c.getTarget() = n) and
|
|
exists(FunctionCall c | c.getEnclosingFunction() = n and c.getTarget() = m) and
|
|
m != n
|
|
select m, n
|