mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Merge pull request #540 from geoffw0/cpp-296
CPP: Fix false positive from AutoGeneratedFile.qll.
This commit is contained in:
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user