diff options
Diffstat (limited to 'compiler-rt/test')
58 files changed, 85 insertions, 82 deletions
diff --git a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc index bbbc423c7ba..df740b64e51 100644 --- a/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc +++ b/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc index 55cfdfff0f2..66a862d7aca 100644 --- a/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc +++ b/compiler-rt/test/asan/TestCases/Windows/allocators_sanity.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc index 12e2b1f5074..f2b2b4511ad 100644 --- a/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc +++ b/compiler-rt/test/asan/TestCases/Windows/beginthreadex.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield.cc b/compiler-rt/test/asan/TestCases/Windows/bitfield.cc index e1a3fc854c9..253a759b98d 100644 --- a/compiler-rt/test/asan/TestCases/Windows/bitfield.cc +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc index 63f3941e8a9..f49d671e3eb 100644 --- a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc index 71399a75a1a..459025bde92 100644 --- a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc index fcf313878a6..c976b87d970 100644 --- a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc index 5a1d9366f35..db5e70741b7 100644 --- a/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc b/compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc index 55449127d85..084f8a45e18 100644 --- a/compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc +++ b/compiler-rt/test/asan/TestCases/Windows/crt_initializers.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t | FileCheck %s // This is a test for http://code.google.com/p/address-sanitizer/issues/detail?id=305 diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc b/compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc index db2b9d19b8d..8b2c4d6dd95 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_aligned_mallocs.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: %run %t %t.dll | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc b/compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc index 2f3f78fe846..1d31f37ca90 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_allocators_sanity.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: %run %t %t.dll | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_host.cc b/compiler-rt/test/asan/TestCases/Windows/dll_host.cc index 470d3fadd20..5eb710e55c8 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_host.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_host.cc @@ -2,7 +2,7 @@ // // Just make sure we can compile this. // The actual compile&run sequence is to be done by the DLL tests. -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // // Get the list of ASan wrappers exported by the main module RTL: // RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | grep -v @ | sort | uniq > %t.exported_wrappers diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc b/compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc index 8a69e7d6a95..9541135407b 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_intercept_memcpy.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc b/compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc index caac42647e1..f41d47858be 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_intercept_strlen.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc index 8064b83cbce..0653ea45f6e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc index 5842999fdf3..b286380ac44 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_uaf.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc b/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc index 4b5bf33aae8..6ec90725145 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <process.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc index 509e0afe015..e52345eab52 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s extern "C" __declspec(dllexport) diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc index 09302c3deb8..c61d4eb29f5 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s struct C { diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc b/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc index 24f98dd39e4..d486cb12225 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <sanitizer/asan_interface.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc b/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc index 22d99705569..6cd74c265b8 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 not %run %t %t.dll 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc index a84eeb9fa2f..8f53623419c 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc @@ -1,5 +1,5 @@ -// RUN: %clangxx_asan -O0 %p/dll_host.cc -Fe%t -// RUN: %clangxx_asan -LD -O0 %s -Fe%t.dll +// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t +// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll // RUN: not %run %t %t.dll 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/double_free.cc b/compiler-rt/test/asan/TestCases/Windows/double_free.cc index 6745c59ae65..18a9fcb44a7 100644 --- a/compiler-rt/test/asan/TestCases/Windows/double_free.cc +++ b/compiler-rt/test/asan/TestCases/Windows/double_free.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc b/compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc index 1cd7080d8d2..55a6d0921cf 100644 --- a/compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc +++ b/compiler-rt/test/asan/TestCases/Windows/double_operator_delete.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cc b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cc index 6d17b245a20..8c147c917c8 100644 --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string.cc +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc index b54a2bb5aa4..3b66b8f14de 100644 --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/hello_world.cc b/compiler-rt/test/asan/TestCases/Windows/hello_world.cc index 2ef37d00006..400ca1b3eac 100644 --- a/compiler-rt/test/asan/TestCases/Windows/hello_world.cc +++ b/compiler-rt/test/asan/TestCases/Windows/hello_world.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc index 73ce951b3dd..89eb175fdcc 100644 --- a/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_memcpy.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc index 1bc235f5a33..0a40d8634f0 100644 --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc index 62a5be8b3c1..928a286bedf 100644 --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strlen.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc index 2f6516e7332..ec133c393da 100644 --- a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc index ba1bf93ed0a..9975316d3e0 100644 --- a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc index 3f873ccb628..f58478947bf 100644 --- a/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc index 082cf4c45ea..81b709fe42e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s int main() { diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc index 1465fa06d51..079c78e829b 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc index f48d7a6f128..181799652cb 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc index 1702b51edce..c5bdba5f406 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s struct C { diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc index 7358cbab826..c3e7daca55b 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc index 77454fa0caf..c077f11d68f 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc index e6df9c94dba..7a66d1714b9 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc index 350598ae95c..c435458f0c1 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc index 511e509da82..7d30e1d5c4a 100644 --- a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc index 3b0ad194f27..f741390bd4e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc index 45c5598677a..c5b6953cf76 100644 --- a/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_uaf.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc index 65385e23435..040d855b48e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc index ac267bf7f27..a370246aa07 100644 --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc index 7dc75f8a6f5..1aef1a923d2 100644 --- a/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc +++ b/compiler-rt/test/asan/TestCases/Windows/stack_array_sanity.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t | FileCheck %s #include <stdio.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc b/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc index 1eb64429c2f..7955f268530 100644 --- a/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc +++ b/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: env ASAN_OPTIONS=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s char *x; diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cc b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cc index 6afb0bf81c6..14bb82f042a 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_simple.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_simple.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc index 30e8ce03348..17b9b1bf8ec 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc index 365288d6cbd..601a1b8a876 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc index 49611d93b6c..7da3a807dac 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_reuse.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cc index 3a0d9c5101c..74be8d88c66 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stress.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stress.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t #include <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc index 6bd722bb3d0..9d2c025258f 100644 --- a/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc +++ b/compiler-rt/test/asan/TestCases/Windows/use_after_realloc.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s #include <malloc.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/windows_h.cc b/compiler-rt/test/asan/TestCases/Windows/windows_h.cc index c22118560ec..40cf5a10ad4 100644 --- a/compiler-rt/test/asan/TestCases/Windows/windows_h.cc +++ b/compiler-rt/test/asan/TestCases/Windows/windows_h.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: %run %t // Just make sure we can parse <windows.h> diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc index 0f43a6a9310..112dd5308d1 100644 --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc index 02c9b9f06bc..2859ecc521d 100644 --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -O0 %s -Fe%t +// RUN: %clang_cl_asan -O0 %s -Fe%t // RUN: not %run %t 2>&1 | FileCheck %s class Parent { diff --git a/compiler-rt/test/asan/lit.cfg b/compiler-rt/test/asan/lit.cfg index ef51266eb2c..ad9786f3eae 100644 --- a/compiler-rt/test/asan/lit.cfg +++ b/compiler-rt/test/asan/lit.cfg @@ -1,6 +1,7 @@ # -*- Python -*- import os +import platform def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) @@ -32,19 +33,11 @@ else: # FIXME: Review the set of required flags and check if it can be reduced. target_cflags = [get_required_attr(config, "target_cflags")] + extra_linkflags target_cxxflags = config.cxx_mode_flags + target_cflags -clang_asan_static_cflags = ["-fsanitize=address"] + target_cflags - -clang_path = getattr(config, 'clang', None) -if clang_path.find("clang-cl") == -1: - clang_asan_static_cflags += ["-g", - "-mno-omit-leaf-frame-pointer", - "-fno-omit-frame-pointer", - "-fno-optimize-sibling-calls"] -else: - clang_asan_static_cflags += ["-Zi", - "-Wno-deprecated-declarations", - "-D_HAS_EXCEPTIONS=0"] - +clang_asan_static_cflags = ["-fsanitize=address", + "-mno-omit-leaf-frame-pointer", + "-fno-omit-frame-pointer", + "-fno-optimize-sibling-calls", + "-g"] + target_cflags clang_asan_static_cxxflags = config.cxx_mode_flags + clang_asan_static_cflags if config.asan_dynamic: @@ -76,6 +69,16 @@ if config.asan_dynamic: config.substitutions.append( ("%clang_asan_static ", build_invocation(clang_asan_static_cflags)) ) config.substitutions.append( ("%clangxx_asan_static ", build_invocation(clang_asan_static_cxxflags)) ) +# Windows-specific tests might also use the clang-cl.exe driver. +if platform.system() == 'Windows': + clang_cl_asan_cxxflags = ["-fsanitize=address", + "-Wno-deprecated-declarations", + "-D_HAS_EXCEPTIONS=0", + "-Zi"] + target_cflags + clang_invocation = build_invocation(clang_cl_asan_cxxflags) + clang_cl_invocation = clang_invocation.replace("clang.exe","clang-cl.exe") + config.substitutions.append( ("%clang_cl_asan ", clang_cl_invocation) ) + # FIXME: De-hardcode this path. asan_source_dir = os.path.join( get_required_attr(config, "compiler_rt_src_root"), "lib", "asan") |