CodeQL library for C/C++
codeql/cpp-all 0.13.0 (changelog, source)
Search

Predicate callByReference

Holds if call passes v by reference, either with an explicit address-of operator or implicitly as a C++ reference. Both const and non-const references are included.

Import path

import cpp
predicate callByReference(Call call, Variable v)