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

Predicate cyclomaticComplexityBranches

Gets the number of branching statements and expressions in a block. This is for computing cyclomatic complexity.

Import path

import cpp
int cyclomaticComplexityBranches(BlockStmt b)