diff --git a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp --- a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cpp @@ -1,10 +1,15 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include +#ifdef __MINGW32__ +// FIXME: remove after mingw-w64 adds this declaration. +extern "C" size_t __cdecl _aligned_msize(void *_Memory, size_t _Alignment, + size_t _Offset); +#endif + #define CHECK_ALIGNED(ptr,alignment) \ do { \ if (((uintptr_t)(ptr) % (alignment)) != 0) \ diff --git a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp --- a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp b/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp --- a/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp b/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp --- a/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/breakpoint.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s // Test the error output from a breakpoint. Assertion-like macros often end in diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/double_free.cpp b/compiler-rt/test/asan/TestCases/Windows/double_free.cpp --- a/compiler-rt/test/asan/TestCases/Windows/double_free.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/double_free.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t 2>&1 | FileCheck %s #include #include diff --git a/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp b/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp --- a/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/hello_world.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp b/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp --- a/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/illegal_instruction.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s // Test the error output from an illegal instruction. diff --git a/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp b/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp --- a/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/integer_divide_by_zero.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %env_asan_opts=handle_sigfpe=1 not %run %t 2>&1 | FileCheck %s // Test the error output from dividing by zero. diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/oom.cpp b/compiler-rt/test/asan/TestCases/Windows/oom.cpp --- a/compiler-rt/test/asan/TestCases/Windows/oom.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/oom.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-32-bits diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp --- a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp --- a/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/shadow_mapping_failure.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s // REQUIRES: asan-32-bits diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp b/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp --- a/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/thread_suspended.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t #include diff --git a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp --- a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp b/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp --- a/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/windows_h.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: %run %t // Just make sure we can parse diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp @@ -1,6 +1,5 @@ -// UNSUPPORTED: target={{.*-windows-gnu}} - -// RUN: %clang_cl_asan -Od %s -Fe%t +// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \ +// RUN: %else %{ %clangxx_asan -O0 %s -o %t %} // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -148,6 +148,7 @@ # MSVC-specific tests might also use the clang-cl.exe driver. if platform.system() == 'Windows' and target_is_msvc: + config.available_features.add("clang-cl") clang_cl_cxxflags = ["-Wno-deprecated-declarations", "-WX", "-D_HAS_EXCEPTIONS=0",