CodeQL library for C/C++

Member predicate Function::isConstexpr

Holds if this function is constexpr. Normally, this holds if and only if isDeclaredConstexpr() holds, but in some circumstances they differ. For example, with

int f(int i) { return 6; }
template <typename T> constexpr int g(T x) { return f(x); }

g<int> is declared constexpr, but is not constexpr.

Will also hold if this function is consteval.

predicate isConstexpr()