File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
cpp/ql/lib/semmle/code/cpp/internal Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,20 @@ overlay[local]
9797private predicate isBase ( ) { not isOverlay ( ) }
9898
9999/**
100- * Holds if `path` was extracted in the overlay database.
100+ * 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.
101103 */
102104overlay [ local]
103105private predicate overlayHasFile ( string path ) {
104106 isOverlay ( ) and
105- files ( _, path ) and
106- path != ""
107+ (
108+ overlayChangedFiles ( path )
109+ or
110+ exists ( @file f |
111+ compilation_compiling_files ( _, _, f ) and files ( f , path )
112+ )
113+ )
107114}
108115
109116/**
You can’t perform that action at this time.
0 commit comments