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

Member predicate ConstevalIfStmt::hasRuntimeEvaluatedBranch

Holds if this ‘(not) constexpr if’ statement has a runtime evaluated statement.

For example, this holds for

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

but not for

if consteval { return true; }
predicate hasRuntimeEvaluatedBranch()