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

Predicate constructorMightRunOnStack

Helper predicate for memberFcnMightRunOnStack. Function calls to constructors need to be treated as a special case, because call.getQualifier() is empty. Instead, we need to check whether the constructor is called from an initializer. There are several kinds of initializers to consider.

Import path

import semmle.code.cpp.dataflow.StackAddress
predicate constructorMightRunOnStack(Constructor constructor)