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

Member predicate Expr::hasConversion

Holds if this expression has a conversion.

Type casts and parameterized expressions are not part of the main expression tree structure but attached on the nodes they convert, for example:

 2 + (int)(bool)1

has the main tree:

 2 + 1

and 1 has a bool conversion, while the bool conversion itself has an int conversion.

predicate hasConversion()