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

Member predicate NewArrayExpr::getExtent

Gets the extent of the non-constant array dimension, if any.

As examples, for new char[n] and new char[n][10], this gives n, but for new char[10] this gives nothing, as the 10 is considered part of the type.

Expr getExtent()