mirror of
https://github.com/github/codeql.git
synced 2026-06-22 21:27:04 +02:00
Add opt-in InputSig2 predicates to support a function-exit epilogue whose placement depends on reachability (such as Go's deferred calls, run at exit in last-in-first-out order): - deferExitStep: language-provided exit-epilogue edges, wired into explicitStep but excluded from the defer-free reachability. - overridesCallableBodyExit: suppresses the default fall-through edge from a body's "after" node to the normal exit, so the epilogue can be interposed on fall-through paths. To let a language compute the reachability gate for those edges without observing them (and without a non-monotonic cycle through reachable): - explicitStep is split into explicitStepCommon (defer-free) plus deferExitStep, and defaultCfg now negates explicitStepCommon so default evaluation does not depend on deferExitStep. - succIgnoringDeferExit exposes the defer-free successor relation, typed over PreControlFlowNode so it does not depend on reachable. - getASuccessorIgnoringDeferredExit exposes the same relation as a ControlFlowNode member for general use. - isInOrderNode exposes a structural, reachability-free node-identity test for use inside the negations a language needs when computing its gate. - EntryNodeImpl is no longer private, so a language can identify the entry node over PreControlFlowNode. All InputSig2 additions default to none(), leaving other languages unchanged.
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>.