Merge pull request #540 from geoffw0/cpp-296

CPP: Fix false positive from AutoGeneratedFile.qll.
This commit is contained in:
Jonas Jensen
2018-11-26 15:03:21 +01:00
committed by GitHub

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)
)
}
/**