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

Predicate lvalue

Holds if e is evaluated just for its location. This includes expressions that are used in a reference expression (&foo), expressions that are used on the left side of an assignment, and some non-expression types such as Initializer.

For expressions, this is similar to, but different than, e.(Expr).isLValue(), which holds if e has an address.

This relation pervasively influences the interpretation of expressions throughout this module. An element evaluated for its lvalue is treated as evaluating to its location, not its value.

Import path

import semmle.code.cpp.pointsto.PointsTo
predicate lvalue(Element e)