Java: Add abstraction for discardable locatables

This commit is contained in:
Kasper Svendsen
2025-06-25 13:18:55 +02:00
parent 0ee6a78a4a
commit 64f27e2adf
6 changed files with 52 additions and 65 deletions

View File

@@ -990,13 +990,4 @@ class SuperConstructorInvocationStmt extends Stmt, ConstructorCall, @superconstr
}
overlay[local]
private predicate discardableStmt(string file, @stmt s) {
not isOverlay() and
file = getRawFile(s)
}
/** Discard base statements in files fully extracted in the overlay. */
overlay[discard_entity]
private predicate discardStmt(@stmt s) {
exists(string file | discardableStmt(file, s) and extractedInOverlay(file))
}
private class DiscardableStmt extends DiscardableLocatable, @stmt { }