mirror of
https://github.com/github/codeql.git
synced 2026-06-05 13:37:06 +02:00
Adds three new defaulted signature predicates to the shared CFG library: - getWhileElse / getForeachElse: `else` block of a while/for loop, if any (used by Python's `while-else` / `for-else` constructs). - getCatchType: type expression of a catch clause, if any (used by Python's `except SomeExpr:` where the catch type is a runtime expression that needs CFG evaluation). Each predicate defaults to `none()`, so behaviour is unchanged for any language that doesn't override it (verified by re-running java/ql/test/library-tests/controlflow/). The Make0 succession rules are extended: - WhileStmt/ForeachStmt: route the loop-exit edge through the else block before reaching the after-position. - CatchClause: route the matching-evaluation through the type expression (if present) before reaching the after-value position. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CodeQL Shared Libraries
This folder contains shared, language-agnostic CodeQL libraries.
Libraries are organized into separate query packs, in order to allow for
individual versioning. For example, the shared static single assignment (SSA)
library exists in the codeql/ssa pack, which can be referenced by adding
dependencies:
codeql/ssa: 0.0.1
to qlpack.yml.
All shared libraries will belong to a codeql/<name> pack, and live in the
namespace codeql.<name>.