CodeQL library for C/C++

Member predicate Expr::isLValue

Holds if this expression is an lvalue, in the sense of having an address.

Being an lvalue is best approximated as having an address. This is a strict superset of modifiable _lvalue_s, which are best approximated by things which could be on the left-hand side of an assignment. This is also a strict superset of expressions which provide an lvalue, which is best approximated by things whose address is important.

See [basic.lval] in the C++ language specification. In C++03, every expression is either an lvalue or an rvalue. In C++11, every expression is exactly one of an lvalue, an xvalue, or a prvalue (with _rvalue_s being the union of _xvalue_s and _prvalue_s). Using the C++11 terminology, this predicate selects expressions whose value category is lvalue.

predicate isLValue()