We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d0c72e commit 48557f6Copy full SHA for 48557f6
1 file changed
cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll
@@ -97,13 +97,20 @@ 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 |
111
+ compilation_compiling_files(_, _, f) and files(f, path)
112
+ )
113
114
}
115
116
0 commit comments