Semmle 1.22
Skip to end of metadata
Go to start of metadata

Finds pairs of functions that call each other

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