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

Member predicate ConstevalIfStmt::getRuntimeEvaluatedBranch

Gets the statement of this ‘(not) consteval if’ statement evaluated during runtime, if any.

For example, for

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

the result is the BlockStmt { return false; }, and for

if consteval { return true; }

there is no result.

Stmt getRuntimeEvaluatedBranch()