We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d0c72e commit 292b23aCopy full SHA for 292b23a
1 file changed
cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll
@@ -97,13 +97,18 @@ overlay[local]
97
private predicate isBase() { not isOverlay() }
98
99
/**
100
- * Holds if `path` was extracted in the overlay database.
+ * Holds if `path` is a file whose entities should be discarded from the base.
101
+ * This covers explicitly changed files and source files compiled by the
102
+ * overlay, but not headers pulled in only as transitive includes.
103
*/
104
overlay[local]
105
private predicate overlayHasFile(string path) {
106
isOverlay() and
- files(_, path) and
- path != ""
107
+ (
108
+ overlayChangedFiles(path)
109
+ or
110
+ exists(@file f | compilation_compiling_files(_, _, f) and files(f, path))
111
+ )
112
}
113
114
0 commit comments