CodeQL library for C/C++
codeql/cpp-all 1.1.2-dev (changelog, source)

Member predicate LambdaCapture::getInitializer

Gets the expression which yields the final captured value.

In many cases, this will be an instance of VariableAccess. If a this-pointer is being captured, this will be an instance of ThisExpr. For by-value captures of non-primitive types, this will be a call to a copy constructor.

Expr getInitializer()