diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index c7a6a045451e..c27a06994b2f 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -23,3 +23,4 @@ dataExtensions: - ext/generated/*.model.yml - ext/experimental/*.model.yml warnOnImplicitThis: true +compileForOverlayEval: true diff --git a/java/ql/lib/semmle/code/Location.qll b/java/ql/lib/semmle/code/Location.qll index 7265164e8e15..fced632a6dd9 100644 --- a/java/ql/lib/semmle/code/Location.qll +++ b/java/ql/lib/semmle/code/Location.qll @@ -233,5 +233,5 @@ private predicate discardableLocation(string file, @location l) { /** Discard base locations in files fully extracted in the overlay. */ overlay[discard_entity] private predicate discardLocation(@location l) { - exists(string file | discardableLocation(file, l) and extractedInOverlay(file)) + exists(string file | discardableLocation(file, l) and overlayChangedFiles(file)) } diff --git a/java/ql/lib/semmle/code/java/Overlay.qll b/java/ql/lib/semmle/code/java/Overlay.qll index f1cfc5c434f2..27a2420911e4 100644 --- a/java/ql/lib/semmle/code/java/Overlay.qll +++ b/java/ql/lib/semmle/code/java/Overlay.qll @@ -30,15 +30,6 @@ string getRawFileForLoc(@location l) { exists(@file f | locations_default(l, f, _, _, _, _) and files(f, result)) } -/** Holds for files fully extracted in the overlay. */ -overlay[local] -predicate extractedInOverlay(string file) { - isOverlay() and - // numlines is used to restrict attention to fully extracted files and - // ignore skeleton extracted files in the overlay - exists(@locatable l | numlines(l, _, _, _) and file = getRawFile(l)) -} - /** * A `@locatable` that should be discarded in the base variant if its file is * extracted in the overlay variant. @@ -54,7 +45,7 @@ abstract class DiscardableLocatable extends @locatable { overlay[discard_entity] private predicate discardLocatable(@locatable el) { - extractedInOverlay(el.(DiscardableLocatable).getRawFileInBase()) + overlayChangedFiles(el.(DiscardableLocatable).getRawFileInBase()) } /** @@ -77,7 +68,7 @@ abstract class DiscardableReferableLocatable extends @locatable { overlay[discard_entity] private predicate discardReferableLocatable(@locatable el) { exists(DiscardableReferableLocatable drl | drl = el | - extractedInOverlay(drl.getRawFileInBase()) and + overlayChangedFiles(drl.getRawFileInBase()) and not drl.existsInOverlay() ) }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: