]> granicus.if.org Git - clang/commitdiff
Add test case for revision 207575 to verify that on Windows, clang doesn't
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 29 Apr 2014 20:19:13 +0000 (20:19 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Tue, 29 Apr 2014 20:19:13 +0000 (20:19 +0000)
crash with an assertion failure when 'nul' is passed in input.

Modified clang/test/lit.py to add feature 'system-windows' if
`platform.system()` returns 'Windows'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207576 91177308-0d34-0410-b5e6-96231b3b80d8

test/Frontend/windows-nul.c [new file with mode: 0644]
test/lit.cfg

diff --git a/test/Frontend/windows-nul.c b/test/Frontend/windows-nul.c
new file mode 100644 (file)
index 0000000..9a7e357
--- /dev/null
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -dM -E nul -o /dev/null
+
+// REQUIRES: system-windows
+
+// Verify that cc1 doesn't crash with an assertion failure
+// in MemoryBuffer.cpp due to an invalid file size reported
+// when the Windows 'nul' device is passed in input.
+
index 66cec612a3f0f4c8e43479b327248a6c64c8ec95..954e550d60dd23b3f0746019becc3adf405ab333 100644 (file)
@@ -344,6 +344,9 @@ if not platform.system() in ['Windows'] or not execute_external:
 # This is used by debuginfo-tests/*block*.m and debuginfo-tests/foreach.m.
 if platform.system() in ['Darwin']:
     config.available_features.add('system-darwin')
+elif platform.system() in ['Windows']:
+    # For tests that require Windows to run.
+    config.available_features.add('system-windows')
 
 # ANSI escape sequences in non-dumb terminal
 if platform.system() not in ['Windows']: