mirror of
https://github.com/github/codeql.git
synced 2026-04-22 15:25:18 +02:00
Merge branch 'main' of https://github.com/github/codeql into post-release-prep/codeql-cli-2.25.1
This commit is contained in:
@@ -56,6 +56,9 @@ module Option<TypeWithToString T> {
|
||||
|
||||
/** Gets the given element wrapped as an `Option`. */
|
||||
Some some(T c) { result = TSome(c) }
|
||||
|
||||
/** Gets the `None` value. */
|
||||
None none_() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -167,6 +167,14 @@ module Make<LocationSig Location, InputSig<Location> Input> {
|
||||
*/
|
||||
bindingset[this]
|
||||
UnboundList getAPrefix() { result = [this, this.getAProperPrefix()] }
|
||||
|
||||
/**
|
||||
* Holds if this list is a prefix of `other`.
|
||||
*
|
||||
* This is equivalent to `this = other.getAPrefix()`, but more performant.
|
||||
*/
|
||||
bindingset[this, other]
|
||||
predicate isPrefixOf(UnboundList other) { this = other.prefix(this.stringLength()) }
|
||||
}
|
||||
|
||||
/** Provides predicates for constructing `UnboundList`s. */
|
||||
|
||||
Reference in New Issue
Block a user