Skip to content

Commit ce2d959

Browse files
committed
Shared: Add CFG consistency check for scopes with missing entry points
1 parent 0baa9e9 commit ce2d959

File tree

1 file changed

+4
-0
lines changed
  • shared/controlflow/codeql/controlflow

1 file changed

+4
-0
lines changed

shared/controlflow/codeql/controlflow/Cfg.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,13 @@ module Make<LocationSig Location, InputSig<Location> Input> {
13871387
strictcount(sk.getListOrder()) > 1
13881388
}
13891389

1390+
/** Holds if `n` has multiple textual representations. */
13901391
query predicate multipleToString(Node n, string s) {
13911392
s = strictconcat(n.toString(), ",") and
13921393
strictcount(n.toString()) > 1
13931394
}
1395+
1396+
/** Holds if CFG scope `scope` lacks an initial AST node. */
1397+
query predicate scopeNoFirst(CfgScope scope) { not scopeFirst(scope, _) }
13941398
}
13951399
}

0 commit comments

Comments
 (0)