mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
C++: Use shared model coverage code.
This commit is contained in:
@@ -81,6 +81,9 @@ signature module InputSig {
|
||||
) {
|
||||
none()
|
||||
}
|
||||
|
||||
/** Get the separator used between namespace segments. */
|
||||
default string namespaceSegmentSeparator() { result = "." }
|
||||
}
|
||||
|
||||
module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
|
||||
@@ -214,7 +217,7 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
|
||||
private predicate namespaceLink(string shortns, string longns) {
|
||||
relevantNamespace(shortns) and
|
||||
relevantNamespace(longns) and
|
||||
longns.prefix(longns.indexOf(".")) = shortns
|
||||
longns.prefix(longns.indexOf(Input::namespaceSegmentSeparator())) = shortns
|
||||
}
|
||||
|
||||
private predicate canonicalNamespace(string namespace) {
|
||||
|
||||
Reference in New Issue
Block a user