mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Go: avoid overlay-discarding @file entities
...since they are shared between base and overlay
This commit is contained in:
@@ -20,7 +20,9 @@ private @file getFile(@locatable locatable) {
|
|||||||
/** Holds if the `locatable` is in the `file` and is part of the overlay base database. */
|
/** Holds if the `locatable` is in the `file` and is part of the overlay base database. */
|
||||||
private predicate discardableLocatable(@file file, @locatable locatable) {
|
private predicate discardableLocatable(@file file, @locatable locatable) {
|
||||||
not isOverlay() and
|
not isOverlay() and
|
||||||
file = getFile(locatable)
|
file = getFile(locatable) and
|
||||||
|
// Avoid discarding @file entities, since they are shared between base and overlay.
|
||||||
|
not locatable instanceof @file
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user