clang-cl: Remove -O0 option

cl.exe doesn't understand it; there's /Od instead. See also the review
thread for r229575.

Update lots of compiler-rt tests to use -Od instead of -O0.
Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`

Differential Revision: https://reviews.llvm.org/D64506

llvm-svn: 365724
This commit is contained in:
Nico Weber 2019-07-11 01:18:05 +00:00
parent 3ed286a388
commit da233838c9
90 changed files with 121 additions and 123 deletions

View File

@ -120,8 +120,6 @@ def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
def _SLASH_O : CLJoined<"O">,
HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
MetaVarName<"<flags>">;
// FIXME: Not sure why we have -O0 here; MSVC doesn't support that.
def : CLFlag<"O0">, Alias<O0>, HelpText<"Disable optimization">;
def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
HelpText<"Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)">;
def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -2,8 +2,8 @@
// __local_stdio_printf_options function isn't instrumented for coverage.
// RUN: rm -rf %t && mkdir %t && cd %t
// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -O0 %p/dll_host.cc -Fet.exe
// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -O0 %s -Fet.dll
// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/dll_host.cc -Fet.exe
// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -Od %s -Fet.dll
// RUN: %run ./t.exe t.dll 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t | FileCheck %s
// This is a test for http://code.google.com/p/address-sanitizer/issues/detail?id=305

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
//
// This test makes sure ASan symbolizes stack traces the way they are typically

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll | FileCheck %s
#include <malloc.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll | FileCheck %s
#include <malloc.h>

View File

@ -1,9 +1,9 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll 2>&1 | FileCheck %s
// Test that it works correctly even with ICF enabled.
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: %run %t %t.dll 2>&1 | FileCheck %s
#include <iostream>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O2 %s -Fe%t.dll
// RUNX: %run %t %t.dll 2>&1 | FileCheck %s

View File

@ -1,6 +1,6 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
//
// RUN: %clang_cl_asan /Gw -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan /Gw -LD -Od %s -Fe%t.dll
// RUN: %env_asan_opts=report_globals=2 %run %t %t.dll 2>&1 | FileCheck %s --check-prefix=NOSTRIP
// RUN: %clang_cl_asan /Gw -LD -O2 %s -Fe%t.dll -link -opt:ref
// RUN: %env_asan_opts=report_globals=2 %run %t %t.dll 2>&1 | FileCheck %s --check-prefix=STRIP

View File

@ -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: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
//
// Get the list of ASan wrappers exported by the main module RTL:
// note: The mangling decoration (i.e. @4 )is removed because calling convention

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
// On windows 64-bit, the memchr function is written in assembly and is not

View File

@ -1,9 +1,9 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Wno-fortify-source -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Wno-fortify-source -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
// Test that it works correctly even with ICF enabled.
// RUN: %clang_cl_asan -Wno-fortify-source -LD -O0 %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: %clang_cl_asan -Wno-fortify-source -LD -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,9 +1,9 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Wno-fortify-source -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Wno-fortify-source -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
// Test that it works correctly even with ICF enabled.
// RUN: %clang_cl_asan -Wno-fortify-source -LD -O0 %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: %clang_cl_asan -Wno-fortify-source -LD -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <process.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
__attribute__((noinline))

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
extern "C" __declspec(dllexport)

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
struct C {

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <sanitizer/asan_interface.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -LD -O0 -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -O0 -DEXE %s %t.lib -Fe%te.exe
// RUN: %clang_cl_asan -LD -Od -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -Od -DEXE %s %t.lib -Fe%te.exe
// RUN: %env_asan_opts=report_globals=2 %run %te.exe 2>&1 | FileCheck %s
// FIXME: Currently, the MT runtime build crashes on startup due to dbghelp.dll

View File

@ -1,10 +1,10 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
//
// Check both -GS and -GS- builds:
// RUN: %clang_cl_asan -GS -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -GS -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll
//
// RUN: %clang_cl_asan -GS- -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -GS- -LD -Od %s -Fe%t.dll
// RUN: %run %t %t.dll
#include <windows.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: %env_asan_opts=detect_stack_use_after_return=1 not %run %t %t.dll 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -O0 %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -O0 %s -Fe%t.dll
// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
// RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,5 +1,5 @@
// UNSUPPORTED: asan-64-bits
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
#include <cassert>
@ -13,4 +13,4 @@ int main() {
return 0;
}
// CHECK: AddressSanitizer: attempting double-free on [[addr:0x[0-9a-fA-F]+]] in thread T0:
// CHECK: AddressSanitizer: attempting double-free on [[addr:0x[0-9a-fA-F]+]] in thread T0:

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t 2>&1 | FileCheck %s
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=allocator_may_return_null=true %run %t
// RUN: %env_asan_opts=allocator_may_return_null=true:windows_hook_rtl_allocators=true %run %t
// UNSUPPORTED: asan-64-bits
@ -6,4 +6,4 @@
int main() {
void *nope = HeapAlloc(GetProcessHeap(), 0, ((size_t)0) - 1);
return (nope == nullptr) ? 0 : 1;
}
}

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t 2>&1 | FileCheck %s
#include <stdio.h>
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -2,7 +2,7 @@
// functions mentioned in sanitizer_interface.inc.
//
// Just make sure we can compile this.
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
//
// note: The mangling decoration (i.e. @4 )is removed because calling convention
// differ from 32-bit and 64-bit.

View File

@ -1,9 +1,9 @@
// First, check this works with the default blacklist:
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: echo "42" | %run %t 2>&1 | FileCheck %s
//
// Then, make sure it still works when a user uses his own blacklist file:
// RUN: %clang_cl_asan -O0 %s -fsanitize-blacklist=%p/../Helpers/initialization-blacklist.txt -Fe%t2
// RUN: %clang_cl_asan -Od %s -fsanitize-blacklist=%p/../Helpers/initialization-blacklist.txt -Fe%t2
// RUN: echo "42" | %run %t2 2>&1 | FileCheck %s
#include <iostream>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -2,9 +2,9 @@
// variables, thus doesn't explicitly reference any symbol exported by the
// runtime thunk.
//
// RUN: %clang_cl_asan -LD -O0 -DDLL1 %s -Fe%t1.dll
// RUN: %clang_cl_asan -LD -O0 -DDLL2 %s -Fe%t2.dll
// RUN: %clang_cl_asan -O0 -DEXE %s %t1.lib %t2.lib -Fe%t
// RUN: %clang_cl_asan -LD -Od -DDLL1 %s -Fe%t1.dll
// RUN: %clang_cl_asan -LD -Od -DDLL2 %s -Fe%t2.dll
// RUN: %clang_cl_asan -Od -DEXE %s %t1.lib %t2.lib -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
int main() {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
struct C {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,6 +1,6 @@
// Make sure we can handle reloading the same DLL multiple times.
// RUN: %clang_cl_asan -LD -O0 -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -O0 -DEXE %s -Fe%te.exe
// RUN: %clang_cl_asan -LD -Od -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -Od -DEXE %s -Fe%te.exe
// RUN: %env_asan_opts=report_globals=1 %run %te.exe %t.dll 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,5 +1,5 @@
// RUN: %clang_cl_asan -LD -O0 -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -O0 -DEXE %s -Fe%te.exe
// RUN: %clang_cl_asan -LD -Od -DDLL %s -Fe%t.dll
// RUN: %clang_cl_asan -Od -DEXE %s -Fe%te.exe
// RUN: %env_asan_opts=report_globals=2 %run %te.exe %t.dll 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t /MD
// RUN: %clang_cl_asan -Od %s -Fe%t /MD
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
// REQUIRES: asan-rtl-heap-interception

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t /MD
// RUN: %clang_cl_asan -Od %s -Fe%t /MD
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
// REQUIRES: asan-rtl-heap-interception

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t /MD
// RUN: %clang_cl_asan -Od %s -Fe%t /MD
// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
// UNSUPPORTED: asan-64-bits
// REQUIRES: asan-rtl-heap-interception

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t | FileCheck %s
#include <stdio.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
char *x;

View File

@ -1,6 +1,6 @@
// Make sure symbolization works even if the path to the .exe file changes.
// RUN: mkdir %t || true
// RUN: %clang_cl_asan -O0 %s -Fe%t/symbols_path.exe
// RUN: %clang_cl_asan -Od %s -Fe%t/symbols_path.exe
// RUN: not %run %t/symbols_path.exe 2>&1 | FileCheck %s
// RUN: mkdir %t2 || true
// RUN: mv %t/* %t2

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
#include <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <malloc.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: env ASAN_OPTIONS=handle_segv=0 %run %t 2>&1 | FileCheck %s --check-prefix=USER
// RUN: env ASAN_OPTIONS=handle_segv=1 not %run %t 2>&1 | FileCheck %s --check-prefix=ASAN
// Test the default.

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: %run %t
// Just make sure we can parse <windows.h>

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
class Parent {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
class Parent {