CPP: Fix false positive from AutoGeneratedFile.qll.

This commit is contained in:
Geoffrey White
2018-11-23 16:29:39 +00:00
parent dc224c5c94
commit f338a4f0d6

View File

@@ -19,7 +19,10 @@ predicate hasPragmaDifferentFile(File f) {
exists (PreprocessorLine pl, string s |
pl.getFile() = f and
pl.getHead().splitAt(" ", 1) = s and /* Zero index is line number, one index is file reference */
not ("\"" + f.getAbsolutePath() + "\"" = s))
not ("\"" + f.getAbsolutePath() + "\"" = s) and
not ("\"" + f.getRelativePath() + "\"" = s) and
not ("\"" + f.getBaseName() + "\"" = s)
)
}
/**