Skip to content

Commit

Permalink
Shared: Add CFG consistency check for scopes with missing entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Sep 25, 2024
1 parent 0baa9e9 commit f4f2c85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/controlflow/codeql/controlflow/Cfg.qll
Original file line number Diff line number Diff line change
Expand Up @@ -1387,9 +1387,13 @@ module Make<LocationSig Location, InputSig<Location> Input> {
strictcount(sk.getListOrder()) > 1
}

/** Holds if `n` has multiple textual representations. */
query predicate multipleToString(Node n, string s) {
s = strictconcat(n.toString(), ",") and
strictcount(n.toString()) > 1
}

/** Hods if CFG scope lacks an initial AST node. */
query predicate scopeNoFirst(CfgScope scope) { not scopeFirst(scope, _) }
}
}

0 comments on commit f4f2c85

Please sign in to comment.