CodeQL library for C/C++
Search

Module Lambda

Provides classes for modeling lambda expressions and their captures.

Import path

import semmle.code.cpp.exprs.Lambda

Imports

Class

Provides classes representing C++ classes, including structs, unions, and template classes.

Expr

Provides classes modeling C/C++ expressions.

Classes

Closure

A class written by the compiler to be the type of a C++11 lambda expression. For example the variable a in the following code has a closure type: auto a = [x, y](int z) -> int { return x + y + z; };

LambdaCapture

Information about a value captured as part of a lambda expression. For example in the following code, information about x and y is captured: auto a = [x, y](int z) -> int { return x + y + z; };

LambdaExpression

A C++11 lambda expression, for example the expression initializing a in the following code: auto a = [x, y](int z) -> int { return x + y + z; };