diff --git a/cpp/ql/src/semmle/code/cpp/File.qll b/cpp/ql/src/semmle/code/cpp/File.qll index 28f53cbf6033..221093977046 100644 --- a/cpp/ql/src/semmle/code/cpp/File.qll +++ b/cpp/ql/src/semmle/code/cpp/File.qll @@ -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) = "/" ) }