Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,18 @@ overlay[local]
private predicate isBase() { not isOverlay() }

/**
* Holds if `path` was extracted in the overlay database.
* Holds if `path` is a file whose entities should be discarded from the base.
* This covers explicitly changed files and source files compiled by the
* overlay, but not headers pulled in only as transitive includes.
*/
overlay[local]
private predicate overlayHasFile(string path) {
isOverlay() and
files(_, path) and
path != ""
(
overlayChangedFiles(path)
or
exists(@file f | compilation_compiling_files(_, _, f) and files(f, path))
)
}

/**
Expand Down
Loading