From: Andrea Di Biagio Date: Tue, 29 Apr 2014 20:19:13 +0000 (+0000) Subject: Add test case for revision 207575 to verify that on Windows, clang doesn't X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a925782e3f6efeeda184dca0d8e6562ce4d15e2;p=clang Add test case for revision 207575 to verify that on Windows, clang doesn't 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 --- diff --git a/test/Frontend/windows-nul.c b/test/Frontend/windows-nul.c new file mode 100644 index 0000000000..9a7e357629 --- /dev/null +++ b/test/Frontend/windows-nul.c @@ -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. + diff --git a/test/lit.cfg b/test/lit.cfg index 66cec612a3..954e550d60 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -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']: