Merge pull request #1191 from geoffw0/microsoft

CPP: Workaround improvement for File.compiledAsMicrosoft.
This commit is contained in:
Jonas Jensen
2019-04-05 09:22:08 +02:00
committed by GitHub

View File

@@ -309,6 +309,12 @@ class File extends Container, @file {
) or exists(File parent |
parent.compiledAsMicrosoft() and
parent.getAnIncludedFile() = this
) or (
getAbsolutePath().charAt(1) = ":"
// this is not ideal, it detects compilation on a Windows file system
// as a heuristic approximation to compilation with a Microsoft compiler.
) or (
getAbsolutePath().charAt(1) = "/"
)
}