Shared: Add CFG consistency check for scopes with missing entry points

This commit is contained in:
Tom Hvitved
2024-09-25 15:23:51 +02:00
parent 0baa9e9ac1
commit ce2d959b7e

View File

@@ -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
}
/** Holds if CFG scope `scope` lacks an initial AST node. */
query predicate scopeNoFirst(CfgScope scope) { not scopeFirst(scope, _) }
}
}