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

Member predicate Expr::getExplicitlyConverted

Gets this expression with all of its explicit casts, but none of its implicit casts. More precisely this takes conversions up to the last explicit cast (there may be implicit conversions along the way), but does not include conversions after the last explicit cast.

C++ example: C c = (B)d might have three casts: (1) an implicit cast from A to some D, (2) an explicit cast from D to B, and (3) an implicit cast from B to C. Only (1) and (2) would be included.

Expr getExplicitlyConverted()