CodeQL library for C/C++
codeql/cpp-all 2.0.3-dev (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)