CodeQL library for C/C++

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)