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

Member predicate ConstevalIfStmt::hasElse

Holds if this ‘(not) constexpr if’ statement has an ‘else’ statement.

For example, this holds for

if consteval { return true; } else { return false; }

but not for

if consteval { return true; }
predicate hasElse()