[compiler-rt] r367887 - compiler-rt: Rename cc files below test/asan to cpp

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 09:48:14 PDT 2019


Author: nico
Date: Mon Aug  5 09:48:12 2019
New Revision: 367887

URL: http://llvm.org/viewvc/llvm-project?rev=367887&view=rev
Log:
compiler-rt: Rename cc files below test/asan to cpp

See r367803 and similar other changes.

Added:
    compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/leak.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/glob.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/readv.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/oom.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/seh.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc
    compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc
    compiler-rt/trunk/test/asan/TestCases/asan_options-help.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc
    compiler-rt/trunk/test/asan/TestCases/atexit_stats.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
    compiler-rt/trunk/test/asan/TestCases/blacklist.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/contiguous_container.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc
    compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc
    compiler-rt/trunk/test/asan/TestCases/debug_double_free.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/debug_locate.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_locate.cc
    compiler-rt/trunk/test/asan/TestCases/debug_mapping.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc
    compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc
    compiler-rt/trunk/test/asan/TestCases/debug_report.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_report.cc
    compiler-rt/trunk/test/asan/TestCases/debug_stacks.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc
    compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc
    compiler-rt/trunk/test/asan/TestCases/default_blacklist.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/default_options.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/default_options.cc
    compiler-rt/trunk/test/asan/TestCases/describe_address.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/describe_address.cc
    compiler-rt/trunk/test/asan/TestCases/double-free.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/double-free.cc
    compiler-rt/trunk/test/asan/TestCases/error_report_callback.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc
    compiler-rt/trunk/test/asan/TestCases/exitcode.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/exitcode.cc
    compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc
    compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/global-demangle.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/global-demangle.cc
    compiler-rt/trunk/test/asan/TestCases/global-location.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/global-location.cc
    compiler-rt/trunk/test/asan/TestCases/global-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/global-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/global-underflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/global-underflow.cc
    compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc
    compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc
    compiler-rt/trunk/test/asan/TestCases/heap-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc
    compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc
    compiler-rt/trunk/test/asan/TestCases/ill.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/ill.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-bug.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/inline.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/inline.cc
    compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc
    compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc
    compiler-rt/trunk/test/asan/TestCases/interface_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/interface_test.cc
    compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-free.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-free.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc
    compiler-rt/trunk/test/asan/TestCases/large_func_test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/large_func_test.cc
    compiler-rt/trunk/test/asan/TestCases/log-path_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/log-path_test.cc
    compiler-rt/trunk/test/asan/TestCases/longjmp.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/longjmp.cc
    compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc
    compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc
    compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc
    compiler-rt/trunk/test/asan/TestCases/malloc_fill.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc
    compiler-rt/trunk/test/asan/TestCases/max_redzone.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/max_redzone.cc
    compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc
    compiler-rt/trunk/test/asan/TestCases/memcmp_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc
    compiler-rt/trunk/test/asan/TestCases/memset_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/memset_test.cc
    compiler-rt/trunk/test/asan/TestCases/null_deref.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/on_error_callback.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc
    compiler-rt/trunk/test/asan/TestCases/partial_right.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/partial_right.cc
    compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc
    compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc
    compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc
    compiler-rt/trunk/test/asan/TestCases/poison_partial.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/poison_partial.cc
    compiler-rt/trunk/test/asan/TestCases/pr33372.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/pr33372.cc
    compiler-rt/trunk/test/asan/TestCases/print_summary.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/print_summary.cc
    compiler-rt/trunk/test/asan/TestCases/realloc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/realloc.cc
    compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc
    compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc
    compiler-rt/trunk/test/asan/TestCases/speculative_load.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/speculative_load.cc
    compiler-rt/trunk/test/asan/TestCases/speculative_load2.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc
    compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc
    compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc
    compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc
    compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc
    compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-function.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-library.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
    compiler-rt/trunk/test/asan/TestCases/throw_call_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc
    compiler-rt/trunk/test/asan/TestCases/throw_catch.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/throw_catch.cc
    compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc
    compiler-rt/trunk/test/asan/TestCases/time_interceptor.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc
    compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-delete.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-free.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-free.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-poison.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope.cpp
      - copied, changed from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc
    compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc
    compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc
    compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc
    compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc
    compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cpp
      - copied unchanged from r367886, compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc
Removed:
    compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc
    compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc
    compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc
    compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc
    compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc
    compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc
    compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc
    compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc
    compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
    compiler-rt/trunk/test/asan/TestCases/blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc
    compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc
    compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc
    compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc
    compiler-rt/trunk/test/asan/TestCases/debug_locate.cc
    compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc
    compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc
    compiler-rt/trunk/test/asan/TestCases/debug_report.cc
    compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc
    compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc
    compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc
    compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/default_options.cc
    compiler-rt/trunk/test/asan/TestCases/describe_address.cc
    compiler-rt/trunk/test/asan/TestCases/double-free.cc
    compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc
    compiler-rt/trunk/test/asan/TestCases/exitcode.cc
    compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc
    compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/global-demangle.cc
    compiler-rt/trunk/test/asan/TestCases/global-location.cc
    compiler-rt/trunk/test/asan/TestCases/global-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/global-underflow.cc
    compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc
    compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc
    compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc
    compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc
    compiler-rt/trunk/test/asan/TestCases/ill.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
    compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/inline.cc
    compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc
    compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc
    compiler-rt/trunk/test/asan/TestCases/interface_test.cc
    compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-free.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
    compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc
    compiler-rt/trunk/test/asan/TestCases/large_func_test.cc
    compiler-rt/trunk/test/asan/TestCases/log-path_test.cc
    compiler-rt/trunk/test/asan/TestCases/longjmp.cc
    compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc
    compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc
    compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc
    compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc
    compiler-rt/trunk/test/asan/TestCases/max_redzone.cc
    compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc
    compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc
    compiler-rt/trunk/test/asan/TestCases/memset_test.cc
    compiler-rt/trunk/test/asan/TestCases/null_deref.cc
    compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc
    compiler-rt/trunk/test/asan/TestCases/partial_right.cc
    compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc
    compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc
    compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc
    compiler-rt/trunk/test/asan/TestCases/poison_partial.cc
    compiler-rt/trunk/test/asan/TestCases/pr33372.cc
    compiler-rt/trunk/test/asan/TestCases/print_summary.cc
    compiler-rt/trunk/test/asan/TestCases/realloc.cc
    compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc
    compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc
    compiler-rt/trunk/test/asan/TestCases/speculative_load.cc
    compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc
    compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc
    compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc
    compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc
    compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc
    compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
    compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc
    compiler-rt/trunk/test/asan/TestCases/throw_catch.cc
    compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc
    compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc
    compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc
    compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-free.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc
    compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc
    compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc
    compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc
    compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc
    compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc
    compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc
Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/lib/asan/tests/asan_test.cpp
    compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
    compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist.txt
    compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c
    compiler-rt/trunk/test/lit.common.cfg.py

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Mon Aug  5 09:48:12 2019
@@ -281,7 +281,7 @@ append_list_if(COMPILER_RT_HAS_FNO_LTO_F
 
 # The following is a workaround for powerpc64le. This is the only architecture
 # that requires -fno-function-sections to work properly. If lacking, the ASan
-# Linux test function-sections-are-bad.cc fails with the following error:
+# Linux test function-sections-are-bad.cpp fails with the following error:
 # 'undefined symbol: __sanitizer_unaligned_load32'.
 if(DEFINED TARGET_powerpc64le_CFLAGS)
   append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections TARGET_powerpc64le_CFLAGS)

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cpp?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cpp (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cpp Mon Aug  5 09:48:12 2019
@@ -531,7 +531,7 @@ TEST(AddressSanitizer, ManyStackObjectsT
 #endif
 
 #if 0  // This test requires online symbolizer.
-// Moved to lit_tests/stack-oob-frames.cc.
+// Moved to lit_tests/stack-oob-frames.cpp.
 // Reenable here once we have online symbolizer by default.
 NOINLINE static void Frame0(int frame, char *a, char *b, char *c) {
   char d[4] = {0};

Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh Mon Aug  5 09:48:12 2019
@@ -85,7 +85,7 @@ run_lint ${ASAN_RTL_LINT_FILTER} ${ASAN_
                                  ${ASAN_RTL}/*.h &
 run_lint ${ASAN_TEST_LINT_FILTER} ${ASAN_RTL}/tests/*.cpp \
                                   ${ASAN_RTL}/tests/*.h &
-run_lint ${ASAN_LIT_TEST_LINT_FILTER} ${LIT_TESTS}/asan/*/*.cc &
+run_lint ${ASAN_LIT_TEST_LINT_FILTER} ${LIT_TESTS}/asan/*/*.cpp &
 
 # TSan
 TSAN_RTL=${COMPILER_RT}/lib/tsan
@@ -122,7 +122,7 @@ run_lint ${SCUDO_RTL_LINT_FILTER} ${SCUD
 FILES=${COMMON_RTL}/*.inc
 TMPFILES=""
 for FILE in $FILES; do
-  TMPFILE="$(${MKTEMP}).$(basename ${FILE}).cc"
+  TMPFILE="$(${MKTEMP}).$(basename ${FILE}).cpp"
   cp -f $FILE $TMPFILE
   run_lint ${COMMON_RTL_INC_LINT_FILTER} $TMPFILE &
   TMPFILES="$TMPFILES $TMPFILE"

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc (removed)
@@ -1,19 +0,0 @@
-// Check that with empty ASAN_OPTIONS, ASan reports on OS X actually crash
-// the process (abort_on_error=1). See also Linux/abort_on_error.cc.
-
-// RUN: %clangxx_asan %s -o %t
-
-// Intentionally don't inherit the default ASAN_OPTIONS.
-// RUN: env ASAN_OPTIONS="" not --crash %run %t 2>&1 | FileCheck %s
-// When we use lit's default ASAN_OPTIONS, we shouldn't crash.
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/abort_on_error.cpp Mon Aug  5 09:48:12 2019
@@ -1,5 +1,5 @@
 // Check that with empty ASAN_OPTIONS, ASan reports on OS X actually crash
-// the process (abort_on_error=1). See also Linux/abort_on_error.cc.
+// the process (abort_on_error=1). See also Linux/abort_on_error.cpp.
 
 // RUN: %clangxx_asan %s -o %t
 

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc (removed)
@@ -1,38 +0,0 @@
-// UNSUPPORTED: ios
-// When `external_symbolizer_path` is empty on Darwin we fallback on using
-// dladdr as the symbolizer which means we get the symbol name
-// but no source location. The current implementation also doesn't try to
-// change the module name so we end up with the full name so we actually don't
-// need the module map here.
-
-// RUN: %clangxx_asan -O0 -g %s -o %t.executable
-// RUN: %env_asan_opts=symbolize=1,print_module_map=0,external_symbolizer_path= not %run %t.executable > %t2.log 2>&1
-// RUN: FileCheck -input-file=%t2.log -check-prefix=CHECK-PS %s
-// RUN: %asan_symbolize --force-system-symbolizer < %t2.log > %t2.fully_symbolized
-// RUN: FileCheck -input-file=%t2.fully_symbolized -check-prefix=CHECK-FS %s
-
-#include <cstdlib>
-
-// Partially symbolicated back-trace where symbol is available but
-// source location is not and instead module name and offset are
-// printed.
-// CHECK-PS: WRITE of size 4
-// CHECK-PS: #0 0x{{.+}} in foo ({{.+}}.executable:{{.+}}+0x{{.+}})
-// CHECK-PS: #1 0x{{.+}} in main ({{.+}}.executable:{{.+}}+0x{{.+}})
-
-// CHECK-FS: WRITE of size 4
-
-extern "C" void foo(int* a) {
-  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
-  *a = 5;
-}
-
-int main() {
-  int* a = (int*) malloc(sizeof(int));
-  if (!a)
-    return 0;
-  free(a);
-  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
-  foo(a);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cpp Mon Aug  5 09:48:12 2019
@@ -23,7 +23,7 @@
 // CHECK-FS: WRITE of size 4
 
 extern "C" void foo(int* a) {
-  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
+  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cpp:[[@LINE+1]]
   *a = 5;
 }
 
@@ -32,7 +32,7 @@ int main() {
   if (!a)
     return 0;
   free(a);
-  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
+  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cpp:[[@LINE+1]]
   foo(a);
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc (removed)
@@ -1,40 +0,0 @@
-// UNSUPPORTED: ios
-// FIXME(dliew): We currently have to use module map for this test due to the atos
-// symbolizer changing the module name from an absolute path to just the file name.
-// rdar://problem/49784442
-//
-// Simulate partial symbolication (can happen with %L specifier) by printing
-// out %L's fallback which will print the module name and offset instead of a
-// source location.
-// RUN: %clangxx_asan -O0 -g %s -o %t.executable
-// RUN: %env_asan_opts=symbolize=1,print_module_map=1,stack_trace_format='"    #%%n %%p %%F %%M"' not %run %t.executable > %t.log 2>&1
-// RUN: FileCheck -input-file=%t.log -check-prefix=CHECK-PS %s
-// Now try to full symbolicate using the module map.
-// RUN: %asan_symbolize --module-map %t.log --force-system-symbolizer < %t.log > %t.fully_symbolized
-// RUN: FileCheck -input-file=%t.fully_symbolized -check-prefix=CHECK-FS %s
-
-#include <cstdlib>
-
-// Partially symbolicated back-trace where symbol is available but
-// source location is not and instead module name and offset are
-// printed.
-// CHECK-PS: WRITE of size 4
-// CHECK-PS: #0 0x{{.+}} in foo ({{.+}}.executable:{{.+}}+0x{{.+}})
-// CHECK-PS: #1 0x{{.+}} in main ({{.+}}.executable:{{.+}}+0x{{.+}})
-
-// CHECK-FS: WRITE of size 4
-
-extern "C" void foo(int* a) {
-  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
-  *a = 5;
-}
-
-int main() {
-  int* a = (int*) malloc(sizeof(int));
-  if (!a)
-    return 0;
-  free(a);
-  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
-  foo(a);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp Mon Aug  5 09:48:12 2019
@@ -25,7 +25,7 @@
 // CHECK-FS: WRITE of size 4
 
 extern "C" void foo(int* a) {
-  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
+  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-with-module-map.cpp:[[@LINE+1]]
   *a = 5;
 }
 
@@ -34,7 +34,7 @@ int main() {
   if (!a)
     return 0;
   free(a);
-  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
+  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-with-module-map.cpp:[[@LINE+1]]
   foo(a);
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc (removed)
@@ -1,31 +0,0 @@
-// UNSUPPORTED: ios
-// RUN: %clangxx_asan -O0 -g %s -o %t.executable
-
-// Deliberately don't produce the module map and then check that offline symbolization fails
-// when we try to look for it.
-// RUN: %env_asan_opts="symbolize=0,print_module_map=0" not %run %t.executable > %t_no_module_map.log 2>&1
-// RUN: not %asan_symbolize --module-map %t_no_module_map.log --force-system-symbolizer < %t_no_module_map.log 2>&1 | FileCheck -check-prefix=CHECK-NO-MM %s
-// CHECK-NO-MM: ERROR:{{.*}} Failed to find module map
-
-// Now produce the module map and check we can symbolize.
-// RUN: %env_asan_opts="symbolize=0,print_module_map=2" not %run %t.executable > %t_with_module_map.log 2>&1
-// RUN: %asan_symbolize --module-map %t_with_module_map.log --force-system-symbolizer < %t_with_module_map.log 2>&1 | FileCheck -check-prefix=CHECK-MM %s
-
-#include <cstdlib>
-
-// CHECK-MM: WRITE of size 4
-
-extern "C" void foo(int* a) {
-  // CHECK-MM: #0 0x{{.+}} in foo {{.*}}asan-symbolize-with-module-map.cc:[[@LINE+1]]
-  *a = 5;
-}
-
-int main() {
-  int* a = (int*) malloc(sizeof(int));
-  if (!a)
-    return 0;
-  free(a);
-  // CHECK-MM: #1 0x{{.+}} in main {{.*}}asan-symbolize-with-module-map.cc:[[@LINE+1]]
-  foo(a);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-with-module-map.cpp Mon Aug  5 09:48:12 2019
@@ -16,7 +16,7 @@
 // CHECK-MM: WRITE of size 4
 
 extern "C" void foo(int* a) {
-  // CHECK-MM: #0 0x{{.+}} in foo {{.*}}asan-symbolize-with-module-map.cc:[[@LINE+1]]
+  // CHECK-MM: #0 0x{{.+}} in foo {{.*}}asan-symbolize-with-module-map.cpp:[[@LINE+1]]
   *a = 5;
 }
 
@@ -25,7 +25,7 @@ int main() {
   if (!a)
     return 0;
   free(a);
-  // CHECK-MM: #1 0x{{.+}} in main {{.*}}asan-symbolize-with-module-map.cc:[[@LINE+1]]
+  // CHECK-MM: #1 0x{{.+}} in main {{.*}}asan-symbolize-with-module-map.cpp:[[@LINE+1]]
   foo(a);
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan_gen_prefixes.cc (removed)
@@ -1,16 +0,0 @@
-// Make sure ___asan_gen_* strings have the correct prefixes on Darwin
-// ("L" in __TEXT,__cstring, "l" in __TEXT,__const
-
-// RUN: %clang_asan %s -S -o %t.s
-// RUN: cat %t.s | FileCheck %s || exit 1
-
-// UNSUPPORTED: ios
-
-int x, y, z;
-int main() { return 0; }
-// CHECK: .section{{.*}}__TEXT,__const
-// CHECK: l____asan_gen_
-// CHECK: .section{{.*}}__TEXT,__cstring,cstring_literals
-// CHECK: L____asan_gen_
-// CHECK: L____asan_gen_
-// CHECK: L____asan_gen_

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc (removed)
@@ -1,30 +0,0 @@
-// Check that when having a DYLD_ROOT_PATH set, the symbolizer still works.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=verbosity=2 DYLD_ROOT_PATH="/" ASAN_SYMBOLIZER_PATH=$(which atos) \
-// RUN:   not %run %t 2>&1 | FileCheck %s
-//
-// Due to a bug in atos, this only works on x86_64.
-// REQUIRES: asan-64-bits
-
-// Path returned by `which atos` is invalid on iOS.
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  memset(x, 0, 10);
-  int res = x[argc];
-  free(x);
-  free(x + argc - 1);  // BOOM
-  // CHECK: Using atos at user-specified path:
-  // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
-  // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cc:[[@LINE-4]]
-  // CHECK: freed by thread T0 here:
-  // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cc:[[@LINE-8]]
-  // CHECK: allocated by thread T0 here:
-  // CHECK: atos-symbolizer-dyld-root-path.cc:[[@LINE-13]]
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cpp Mon Aug  5 09:48:12 2019
@@ -20,11 +20,11 @@ int main(int argc, char **argv) {
   // CHECK: Using atos at user-specified path:
   // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
   // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cc:[[@LINE-4]]
+  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cpp:[[@LINE-4]]
   // CHECK: freed by thread T0 here:
   // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cc:[[@LINE-8]]
+  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer-dyld-root-path.cpp:[[@LINE-8]]
   // CHECK: allocated by thread T0 here:
-  // CHECK: atos-symbolizer-dyld-root-path.cc:[[@LINE-13]]
+  // CHECK: atos-symbolizer-dyld-root-path.cpp:[[@LINE-13]]
   return res;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc (removed)
@@ -1,27 +0,0 @@
-// Check that the `atos` symbolizer works.
-
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=verbosity=2 ASAN_SYMBOLIZER_PATH=$(which atos) not %run %t 2>&1 | FileCheck %s
-
-// Path returned by `which atos` is invalid on iOS.
-// UNSUPPORTED: ios, i386-darwin
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  memset(x, 0, 10);
-  int res = x[argc];
-  free(x);
-  free(x + argc - 1);  // BOOM
-  // CHECK: Using atos at user-specified path:
-  // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
-  // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-4]]
-  // CHECK: freed by thread T0 here:
-  // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-8]]
-  // CHECK: allocated by thread T0 here:
-  // CHECK: atos-symbolizer.cc:[[@LINE-13]]
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/atos-symbolizer.cpp Mon Aug  5 09:48:12 2019
@@ -17,11 +17,11 @@ int main(int argc, char **argv) {
   // CHECK: Using atos at user-specified path:
   // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
   // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-4]]
+  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cpp:[[@LINE-4]]
   // CHECK: freed by thread T0 here:
   // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-8]]
+  // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cpp:[[@LINE-8]]
   // CHECK: allocated by thread T0 here:
-  // CHECK: atos-symbolizer.cc:[[@LINE-13]]
+  // CHECK: atos-symbolizer.cpp:[[@LINE-13]]
   return res;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/dladdr-demangling.cc (removed)
@@ -1,36 +0,0 @@
-// In a non-forking sandbox, we fallback to dladdr(). Test that we provide
-// properly demangled C++ names in that case.
-
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=verbosity=2 not %run sandbox-exec -p '(version 1)(allow default)(deny process-fork)' %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-DLADDR
-
-// sandbox-exec isn't available on iOS
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-
-class MyClass {
- public:
-  int my_function(int n) {
-    char *x = (char*)malloc(n * sizeof(char));
-    free(x);
-    return x[5];
-    // CHECK-DLADDR: Using dladdr symbolizer
-    // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-    // CHECK: {{READ of size 1 at 0x.* thread T0}}
-    // CHECK-DLADDR: failed to fork
-    // CHECK: {{    #0 0x.* in MyClass::my_function\(int\)}}
-    // CHECK: {{freed by thread T0 here:}}
-    // CHECK: {{    #0 0x.* in wrap_free}}
-    // CHECK: {{    #1 0x.* in MyClass::my_function\(int\)}}
-    // CHECK: {{previously allocated by thread T0 here:}}
-    // CHECK: {{    #0 0x.* in wrap_malloc}}
-    // CHECK: {{    #1 0x.* in MyClass::my_function\(int\)}}
-  }
-};
-
-int main() {
-  MyClass o;
-  return o.my_function(10);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/dump_registers.cc (removed)
@@ -1,26 +0,0 @@
-// Check that ASan dumps the CPU registers on a SIGSEGV.
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdio.h>
-#include <sys/mman.h>
-
-int main() {
-  fprintf(stderr, "Hello\n");
-  char *ptr;
-
-  ptr = (char *)mmap(NULL, 0x10000, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
-  assert(ptr && "failed to mmap");
-
-  fprintf(stderr, sizeof(uintptr_t) == 8 ? "p = 0x%016lx\n" : "p = 0x%08lx\n", (uintptr_t)ptr);
-  // CHECK: p = [[ADDR:0x[0-9]+]]
-
-  char c = *ptr;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: {{SEGV|BUS}}
-  // CHECK: Register values:
-  // CHECK: [[ADDR]]
-  fprintf(stderr, "World\n");
-  return c;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc (removed)
@@ -1,46 +0,0 @@
-// When DYLD-inserting the ASan dylib from a different location than the
-// original, make sure we don't try to reexec.
-
-// UNSUPPORTED: ios
-
-// RUN: rm -rf %t && mkdir -p %t
-// RUN: cp `%clang_asan -print-file-name=lib`/darwin/libclang_rt.asan_osx_dynamic.dylib \
-// RUN:   %t/libclang_rt.asan_osx_dynamic.dylib
-// RUN: %clangxx_asan %s -o %t/a.out
-
-// RUN:   %env_asan_opts=verbosity=1 \
-// RUN:       DYLD_INSERT_LIBRARIES=@executable_path/libclang_rt.asan_osx_dynamic.dylib \
-// RUN:       %run %t/a.out 2>&1 \
-// RUN:   | FileCheck %s
-
-// RUN: IS_OSX_10_11_OR_HIGHER=$([ `sw_vers -productVersion | cut -d'.' -f2` -lt 11 ]; echo $?)
-
-// On OS X 10.10 and lower, if the dylib is not DYLD-inserted, ASan will re-exec.
-// RUN: if [ $IS_OSX_10_11_OR_HIGHER == 0 ]; then \
-// RUN:   %env_asan_opts=verbosity=1 %run %t/a.out 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-NOINSERT %s; \
-// RUN:   fi
-
-// On OS X 10.11 and higher, we don't need to DYLD-insert anymore, and the interceptors
-// still installed correctly. Let's just check that things work and we don't try to re-exec.
-// RUN: if [ $IS_OSX_10_11_OR_HIGHER == 1 ]; then \
-// RUN:   %env_asan_opts=verbosity=1 %run %t/a.out 2>&1 \
-// RUN:   | FileCheck %s; \
-// RUN:   fi
-
-#include <stdio.h>
-
-int main() {
-  printf("Passed\n");
-  return 0;
-}
-
-// CHECK-NOINSERT: exec()-ing the program with
-// CHECK-NOINSERT: DYLD_INSERT_LIBRARIES
-// CHECK-NOINSERT: to enable wrappers.
-// CHECK-NOINSERT: Passed
-
-// CHECK-NOT: exec()-ing the program with
-// CHECK-NOT: DYLD_INSERT_LIBRARIES
-// CHECK-NOT: to enable wrappers.
-// CHECK: Passed

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc (removed)
@@ -1,45 +0,0 @@
-// Check that when launching with DYLD_INSERT_LIBRARIES, we properly remove
-// the ASan dylib from the environment variable (both when using an absolute
-// or relative path) and also that the other dylibs are left untouched.
-
-// UNSUPPORTED: ios
-
-// RUN: rm -rf %t && mkdir -p %t
-// RUN: cp `%clang_asan -print-file-name=lib`/darwin/libclang_rt.asan_osx_dynamic.dylib \
-// RUN:   %t/libclang_rt.asan_osx_dynamic.dylib
-
-// RUN: %clangxx_asan %s -o %t/a.out
-// RUN: %clangxx -DSHARED_LIB %s \
-// RUN:     -dynamiclib -o %t/dummy-so.dylib
-
-// RUN: ( cd %t && \
-// RUN:   DYLD_INSERT_LIBRARIES=@executable_path/libclang_rt.asan_osx_dynamic.dylib:dummy-so.dylib \
-// RUN:   %run ./a.out 2>&1 ) | FileCheck %s || exit 1
-
-// RUN: ( cd %t && \
-// RUN:   DYLD_INSERT_LIBRARIES=libclang_rt.asan_osx_dynamic.dylib:dummy-so.dylib \
-// RUN:   %run ./a.out 2>&1 ) | FileCheck %s || exit 1
-
-// RUN: ( cd %t && \
-// RUN:   %env_asan_opts=strip_env=0 \
-// RUN:   DYLD_INSERT_LIBRARIES=libclang_rt.asan_osx_dynamic.dylib:dummy-so.dylib \
-// RUN:   %run ./a.out 2>&1 ) | FileCheck %s --check-prefix=CHECK-KEEP || exit 1
-
-// RUN: ( cd %t && \
-// RUN:   DYLD_INSERT_LIBRARIES=%t/libclang_rt.asan_osx_dynamic.dylib:dummy-so.dylib \
-// RUN:   %run ./a.out 2>&1 ) | FileCheck %s || exit 1
-
-#if !defined(SHARED_LIB)
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  const char kEnvName[] = "DYLD_INSERT_LIBRARIES";
-  printf("%s=%s\n", kEnvName, getenv(kEnvName));
-  // CHECK: {{DYLD_INSERT_LIBRARIES=dummy-so.dylib}}
-  // CHECK-KEEP: {{DYLD_INSERT_LIBRARIES=libclang_rt.asan_osx_dynamic.dylib:dummy-so.dylib}}
-  return 0;
-}
-#else  // SHARED_LIB
-void foo() {}
-#endif  // SHARED_LIB

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/empty-section.cc (removed)
@@ -1,12 +0,0 @@
-// Regression test with an empty (length = 0) custom section.
-
-// RUN: %clangxx_asan -g -O0 %s -c -o %t.o
-// RUN: %clangxx_asan -g -O0 %t.o -o %t -sectcreate mysegment mysection /dev/null
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-
-int main() {
-  printf("Hello, world!\n");
-  // CHECK: Hello, world!
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc (removed)
@@ -1,100 +0,0 @@
-// RUN: %clangxx_asan -arch x86_64 -arch x86_64h -g -O0 %s -c -o %t.o.fat
-// RUN: %clangxx_asan -arch x86_64 -arch x86_64h -g %t.o.fat -o %t.fat
-
-// RUN: lipo %t.fat -thin    x86_64  -output %t.thin.x86_64  && lipo %t.thin.x86_64  -info | FileCheck %s --check-prefix=CHECK-LIPO-THIN-X86_64
-// RUN: lipo %t.fat -thin    x86_64h -output %t.thin.x86_64h && lipo %t.thin.x86_64h -info | FileCheck %s --check-prefix=CHECK-LIPO-THIN-X86_64H
-// RUN: lipo %t.fat -extract x86_64  -output %t.fat.x86_64   && lipo %t.fat.x86_64   -info | FileCheck %s --check-prefix=CHECK-LIPO-FAT-X86_64
-// RUN: lipo %t.fat -extract x86_64h -output %t.fat.x86_64h  && lipo %t.fat.x86_64h  -info | FileCheck %s --check-prefix=CHECK-LIPO-FAT-X86_64H
-
-// CHECK-LIPO-THIN-X86_64:  Non-fat file: {{.*}} is architecture: x86_64
-// CHECK-LIPO-THIN-X86_64H: Non-fat file: {{.*}} is architecture: x86_64h
-// CHECK-LIPO-FAT-X86_64:   Architectures in the fat file: {{.*}} are: x86_64
-// CHECK-LIPO-FAT-X86_64H:  Architectures in the fat file: {{.*}} are: x86_64h
-
-// RUN: dsymutil %t.thin.x86_64
-// RUN: dsymutil %t.thin.x86_64h
-// RUN: dsymutil %t.fat.x86_64
-// RUN: dsymutil %t.fat.x86_64h
-
-// Check LLVM symbolizer
-// RUN: %env_asan_opts=external_symbolizer_path=$(which llvm-symbolizer) not %run %t.thin.x86_64  2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which llvm-symbolizer) not %run %t.thin.x86_64h 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which llvm-symbolizer) not %run %t.fat.x86_64   2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which llvm-symbolizer) not %run %t.fat.x86_64h  2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-
-// Check atos
-// RUN: %env_asan_opts=external_symbolizer_path=$(which atos) not %run %t.thin.x86_64  2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which atos) not %run %t.thin.x86_64h 2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which atos) not %run %t.fat.x86_64   2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path=$(which atos) not %run %t.fat.x86_64h  2>&1 | FileCheck %s --check-prefixes CHECK,CHECK-LI,CHECK-DATA
-
-// Check dladdr
-// RUN: %env_asan_opts=external_symbolizer_path= not %run %t.thin.x86_64  2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOLI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path= not %run %t.thin.x86_64h 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOLI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path= not %run %t.fat.x86_64   2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOLI,CHECK-DATA
-// RUN: %env_asan_opts=external_symbolizer_path= not %run %t.fat.x86_64h  2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NOLI,CHECK-DATA
-
-// Check asan_symbolize.py with llvm-symbolizer
-// RUN: %env_asan_opts=symbolize=0 not %run %t.thin.x86_64  2>&1 | %asan_symbolize | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.thin.x86_64h 2>&1 | %asan_symbolize | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.fat.x86_64   2>&1 | %asan_symbolize | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.fat.x86_64h  2>&1 | %asan_symbolize | FileCheck %s --check-prefixes CHECK,CHECK-LI
-
-// Check asan_symbolize.py with atos
-// RUN: %env_asan_opts=symbolize=0 not %run %t.thin.x86_64  2>&1 | %asan_symbolize --force-system-symbolizer | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.thin.x86_64h 2>&1 | %asan_symbolize --force-system-symbolizer | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.fat.x86_64   2>&1 | %asan_symbolize --force-system-symbolizer | FileCheck %s --check-prefixes CHECK,CHECK-LI
-// RUN: %env_asan_opts=symbolize=0 not %run %t.fat.x86_64h  2>&1 | %asan_symbolize --force-system-symbolizer | FileCheck %s --check-prefixes CHECK,CHECK-LI
-
-// REQUIRES: x86-target-arch
-// REQUIRES: x86_64h
-// UNSUPPORTED: ios
-
-#include <sanitizer/common_interface_defs.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if __x86_64h__
-// Unused functions and globals, just to mess up the offsets in x86_64h.
-void dummy(char *a, char *b) {
-  while (*a == *b) {
-    a[0] = b[0];
-    a[1] = b[1];
-    a[2] = b[2];
-    a[3] = b[3];
-    fprintf(stderr, "dummy\n");
-  }
-  fprintf(stderr, "dummy\n");
-}
-long dummy_global;
-long dummy_global2[100];
-#endif
-
-extern "C"
-long faulty_global = 10;
-
-void check_data_symbolication() {
-  char data[100];
-  __sanitizer_symbolize_global(&faulty_global, "%g", data, sizeof(data));
-  fprintf(stderr, "symbolized global: %s\n", data);
-  // CHECK-DATA: symbolized global: faulty_global
-}
-
-extern "C"
-void faulty_func(char *p) {
-  *p = 'x';  // BOOM
-  // CHECK: AddressSanitizer: global-buffer-overflow
-  // CHECK-LI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication.cc:[[@LINE-2]]
-  // CHECK-NOLI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication
-  // CHECK: is located 2 bytes to the right of global variable 'faulty_global'
-  // CHECK-NOT: LLVMSymbolizer: error reading file
-}
-
-int main() {
-  check_data_symbolication();
-
-  char *p = (char *)(void *)&faulty_global;
-  p += 10;
-  faulty_func(p);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/haswell-symbolication.cpp Mon Aug  5 09:48:12 2019
@@ -84,7 +84,7 @@ extern "C"
 void faulty_func(char *p) {
   *p = 'x';  // BOOM
   // CHECK: AddressSanitizer: global-buffer-overflow
-  // CHECK-LI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication.cc:[[@LINE-2]]
+  // CHECK-LI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication.cpp:[[@LINE-2]]
   // CHECK-NOLI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication
   // CHECK: is located 2 bytes to the right of global variable 'faulty_global'
   // CHECK-NOT: LLVMSymbolizer: error reading file

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/init_for_dlopen.cc (removed)
@@ -1,46 +0,0 @@
-// RUN: %clangxx -g -O0 %s -o %t
-
-// Check that trying to dlopen() the ASan dylib fails.
-// We explictly set `abort_on_error=0` because
-// - By default the lit config sets this but we don't want this
-//   test to implicitly depend on this.
-// - It avoids requiring `--crash` to be passed to `not`.
-// RUN: APPLE_ASAN_INIT_FOR_DLOPEN=0 %env_asan_opts=abort_on_error=0 not \
-// RUN:   %run %t %shared_libasan 2>&1 | \
-// RUN:   FileCheck -check-prefix=CHECK-DL-OPEN-FAIL %s
-// RUN: env -u APPLE_ASAN_INIT_FOR_DLOPEN %env_asan_opts=abort_on_error=0 not \
-// RUN:   %run %t %shared_libasan 2>&1 | \
-// RUN:   FileCheck -check-prefix=CHECK-DL-OPEN-FAIL %s
-
-// Check that we can successfully dlopen the ASan dylib when we set the right
-// environment variable.
-// RUN: env APPLE_ASAN_INIT_FOR_DLOPEN=1 %run %t %shared_libasan 2>&1 | \
-// RUN:   FileCheck -check-prefix=CHECK-DL-OPEN-SUCCESS %s
-
-#include <dlfcn.h>
-#include <stdio.h>
-
-// CHECK-DL-OPEN-FAIL: ERROR: Interceptors are not working
-
-int main(int argc, char **argv) {
-  if (argc != 2) {
-    fprintf(stderr, "Usage: %s <dylib_path>\n", argv[0]);
-    return 1;
-  }
-  const char *dylib_path = argv[1];
-  void *handle = dlopen(dylib_path, RTLD_LAZY);
-  if (!handle) {
-    fprintf(stderr, "Failed to dlopen: %s\n", dlerror());
-    return 1;
-  }
-  // Make sure we can find a function we expect to be in the dylib.
-  void *fn = dlsym(handle, "__sanitizer_mz_size");
-  if (!fn) {
-    fprintf(stderr, "Failed to get symbol: %s\n", dlerror());
-    return 1;
-  }
-  // TODO(dliew): Actually call a function from the dylib that is safe to call.
-  // CHECK-DL-OPEN-SUCCESS: DONE
-  printf("DONE\n");
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/interface_symbols_darwin.cc (removed)
@@ -1,36 +0,0 @@
-// Check the presence of interface symbols in the ASan runtime dylib.
-// If you're changing this file, please also change
-// ../Linux/interface_symbols.c
-
-// RUN: %clangxx_asan -dead_strip -O2 %s -o %t.exe
-//
-// note: we can not use -D on Darwin.
-// RUN: nm -g `%clang_asan %s -fsanitize=address -### 2>&1 | grep "libclang_rt.asan_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.asan_osx_dynamic.dylib\)".*/\1/'` \
-// RUN:  | grep " [TU] "                                                       \
-// RUN:  | grep -o "\(__asan_\|__ubsan_\|__sancov_\|__sanitizer_\)[^ ]*"       \
-// RUN:  | grep -v "__sanitizer_syscall"                                       \
-// RUN:  | grep -v "__sanitizer_weak_hook"                                     \
-// RUN:  | grep -v "__sanitizer_mz"                                            \
-// RUN:  | grep -v "__sancov_lowest_stack"                                     \
-// RUN:  | sed -e "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \
-// RUN:  > %t.exports
-//
-// RUN: grep -e "INTERFACE_\(WEAK_\)\?FUNCTION"                                \
-// RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
-// RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface_posix.inc \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | grep -v "__sanitizer_weak_hook"                                     \
-// RUN:  | sed -e "s/.*(//" -e "s/).*//" > %t.imports
-//
-// RUN: cat %t.imports | sort | uniq > %t.imports-sorted
-// RUN: cat %t.exports | sort | uniq > %t.exports-sorted
-//
-// RUN: echo
-// RUN: echo "=== NOTE === If you see a mismatch below, please update sanitizer_interface.inc files."
-// RUN: diff %t.imports-sorted %t.exports-sorted
-
-// UNSUPPORTED: ios
-
-int main() { return 0; }

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/linked-only.cc (removed)
@@ -1,33 +0,0 @@
-// Main executable is uninstrumented, but linked to ASan runtime.
-// Regression test for https://code.google.com/p/address-sanitizer/issues/detail?id=357.
-
-// RUN: %clangxx -g -O0 %s -c -o %t.o
-// RUN: %clangxx_asan -g -O0 %t.o -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "sanitizer/asan_interface.h"
-
-void test_shadow(char *p, size_t size) {
-  fprintf(stderr, "p = %p\n", p);
-  char *q = (char *)__asan_region_is_poisoned(p, size);
-  fprintf(stderr, "=%zd=\n", q ? q - p : -1);
-}
-
-int main(int argc, char *argv[]) {
-  char *p = (char *)malloc(10000);
-  test_shadow(p, 100);
-  free(p);
-  // CHECK: =-1=
-
-  test_shadow((char *)&main, 1);
-  // CHECK: =-1=
-
-  test_shadow((char *)&p, 1);
-  // CHECK: =-1=
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_destroy_zone.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <malloc/malloc.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-int main() {
-  fprintf(stderr, "start\n");
-  malloc_zone_t *zone = malloc_create_zone(0, 0);
-  fprintf(stderr, "zone = %p\n", zone);
-  malloc_set_zone_name(zone, "myzone");
-  fprintf(stderr, "name changed\n");
-  malloc_destroy_zone(zone);
-  fprintf(stderr, "done\n");
-  return 0;
-}
-
-// CHECK: start
-// CHECK-NEXT: zone = 0x{{.*}}
-// CHECK-NEXT: name changed
-// CHECK-NEXT: done

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_set_zone_name-mprotect.cc (removed)
@@ -1,52 +0,0 @@
-// Regression test for a bug in malloc_create_zone()
-// (https://code.google.com/p/address-sanitizer/issues/detail?id=203)
-// The old implementation of malloc_create_zone() didn't always return a
-// page-aligned address, so we can only test on a best-effort basis.
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: %run %t 2>&1
-
-#include <malloc/malloc.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-const int kNumIter = 4096;
-const int kNumZones = 100;
-int main() {
-  char *mem[kNumIter * 2];
-  // Allocate memory chunks from different size classes up to 1 page.
-  // (For the case malloc() returns memory chunks in descending order)
-  for (int i = 0; i < kNumIter; i++) {
-    mem[i] = (char*)malloc(8 * i);
-  }
-  // Try to allocate a page-aligned malloc zone. Otherwise the mprotect() call
-  // in malloc_set_zone_name() will silently fail.
-  malloc_zone_t *zone = NULL;
-  bool aligned = false;
-  for (int i = 0; i < kNumZones; i++) {
-    zone = malloc_create_zone(0, 0);
-    if (((uintptr_t)zone & (~0xfff)) == (uintptr_t)zone) {
-      aligned = true;
-      break;
-    }
-  }
-  if (!aligned) {
-    printf("Warning: couldn't allocate a page-aligned zone.");
-    return 0;
-  }
-  // malloc_set_zone_name() calls mprotect(zone, 4096, PROT_READ | PROT_WRITE),
-  // modifies the zone contents and then calls mprotect(zone, 4096, PROT_READ).
-  malloc_set_zone_name(zone, "foobar");
-  // Allocate memory chunks from different size classes again.
-  for (int i = 0; i < kNumIter; i++) {
-    mem[i + kNumIter] = (char*)malloc(8 * i);
-  }
-  // Access the allocated memory chunks and free them.
-  for (int i = 0; i < kNumIter * 2; i++) {
-    memset(mem[i], 'a', 8 * (i % kNumIter));
-    free(mem[i]);
-  }
-  malloc_destroy_zone(zone);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/malloc_zone-protected.cc (removed)
@@ -1,20 +0,0 @@
-// Make sure the zones created by malloc_create_zone() are write-protected.
-#include <malloc/malloc.h>
-#include <stdio.h>
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-
-void *pwn(malloc_zone_t *unused_zone, size_t unused_size) {
-  printf("PWNED\n");
-  return NULL;
-}
-
-int main() {
-  malloc_zone_t *zone = malloc_create_zone(0, 0);
-  zone->malloc = pwn;
-  void *v = malloc_zone_malloc(zone, 1);
-  // CHECK-NOT: PWNED
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/mixing-global-constructors.cc (removed)
@@ -1,42 +0,0 @@
-// A global constructor from a non-instrumented part calls a function
-// in an instrumented part.
-// Regression test for https://code.google.com/p/address-sanitizer/issues/detail?id=363.
-
-// RUN: %clangxx      -DINSTRUMENTED_PART=0 -c %s -o %t-uninst.o
-// RUN: %clangxx_asan -DINSTRUMENTED_PART=1 -c %s -o %t-inst.o
-// RUN: %clangxx_asan %t-uninst.o %t-inst.o -o %t
-
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void func(char *ptr);
-
-#if INSTRUMENTED_PART == 1
-
-void func(char *ptr) {
-  *ptr = 'X';
-}
-
-#else // INSTRUMENTED_PART == 1
-
-struct C1 {
-  C1() {
-    printf("Hello ");
-    char buffer[10] = "world";
-    func(buffer);
-    printf("%s\n", buffer);
-  }
-};
-
-C1 *obj = new C1();
-
-int main(int argc, const char *argv[]) {
-  return 0;
-}
-
-#endif // INSTRUMENTED_PART == 1
-
-// CHECK: Hello Xorld

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/odr-lto.cc (removed)
@@ -1,39 +0,0 @@
-// Check that -asan-use-private-alias silence the false
-// positive ODR violation on Darwin with LTO.
-
-// REQUIRES: lto
-
-// RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias
-// RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias
-// RUN: %clangxx_asan %t-1.o %t-2.o -o %t -flto
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-void putstest();
-
-#if PART == 1
-
-static const char *my_global = "test\n\00abc";
-
-int main()
-{
-  fputs(my_global, stderr);
-  putstest();
-  fprintf(stderr, "Done.\n");
-  return 0;
-}
-
-#else // PART == 1
-
-static const char *my_other_global = "test\n\00abc";
-
-void putstest()
-{
-  fputs(my_other_global, stderr);
-}
-
-#endif // PART == 1
-
-// CHECK-NOT: ERROR: AddressSanitizer: odr-violation
-// CHECK: Done.

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc (removed)
@@ -1,27 +0,0 @@
-// Make sure ASan doesn't hang in an exec loop if DYLD_INSERT_LIBRARIES is set.
-// This is a regression test for
-// https://code.google.com/p/address-sanitizer/issues/detail?id=159
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: %clangxx -DSHARED_LIB %s \
-// RUN:     -dynamiclib -o darwin-dummy-shared-lib-so.dylib
-
-// FIXME: the following command line may hang in the case of a regression.
-// RUN: %env DYLD_INSERT_LIBRARIES=darwin-dummy-shared-lib-so.dylib \
-// RUN:     %run %t 2>&1 | FileCheck %s || exit 1
-
-// UNSUPPORTED: ios
-
-#if !defined(SHARED_LIB)
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  const char kEnvName[] = "DYLD_INSERT_LIBRARIES";
-  printf("%s=%s\n", kEnvName, getenv(kEnvName));
-  // CHECK: {{DYLD_INSERT_LIBRARIES=.*darwin-dummy-shared-lib-so.dylib.*}}
-  return 0;
-}
-#else  // SHARED_LIB
-void foo() {}
-#endif  // SHARED_LIB

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/sandbox-symbolizer.cc (removed)
@@ -1,32 +0,0 @@
-// In a non-forking sandbox, we can't spawn an external symbolizer, but dladdr()
-// should still work and provide function names. No line numbers though.
-// Second, `atos` symbolizer can't inspect a process that has an inaccessible
-// task port, in which case we should again fallback to dladdr gracefully.
-
-// RUN: %clangxx_asan -O0 %s -o %t 
-// RUN: not %run sandbox-exec -p '(version 1)(allow default)(deny process-fork)' %t 2>&1 | FileCheck %s
-// RUN: not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s
-// RUN: env ASAN_SYMBOLIZER_PATH="" not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t 
-// RUN: not %run sandbox-exec -p '(version 1)(allow default)(deny process-fork)' %t 2>&1 | FileCheck %s
-// RUN: not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s
-// RUN: env ASAN_SYMBOLIZER_PATH="" not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s
-
-// sandbox-exec isn't available on iOS
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main}}
-  // CHECK: {{freed by thread T0 here:}}
-  // CHECK: {{    #0 0x.* in wrap_free}}
-  // CHECK: {{    #1 0x.* in main}}
-  // CHECK: {{previously allocated by thread T0 here:}}
-  // CHECK: {{    #0 0x.* in wrap_malloc}}
-  // CHECK: {{    #1 0x.* in main}}
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/scribble.cc (removed)
@@ -1,58 +0,0 @@
-// RUN: %clang_asan -O2 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck --check-prefix=CHECK-NOSCRIBBLE %s
-// RUN: %env MallocScribble=1 MallocPreScribble=1 %run %t 2>&1 | FileCheck --check-prefix=CHECK-SCRIBBLE %s
-// RUN: %env_asan_opts=max_free_fill_size=4096 %run %t 2>&1 | FileCheck --check-prefix=CHECK-SCRIBBLE %s
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct Isa {
-  const char *class_name;
-};
-
-struct MyClass {
-  long padding;
-  Isa *isa;
-  long data;
-
-  void print_my_class_name();
-};
-
-__attribute__((no_sanitize("address")))
-void MyClass::print_my_class_name() {
-  fprintf(stderr, "this = %p\n", this);
-  fprintf(stderr, "padding = 0x%lx\n", this->padding);
-  fprintf(stderr, "isa = %p\n", this->isa);
-
-  if ((uint32_t)(uintptr_t)this->isa != 0x55555555) {
-    fprintf(stderr, "class name: %s\n", this->isa->class_name);
-  }
-}
-
-int main() {
-  Isa *my_class_isa = (Isa *)malloc(sizeof(Isa));
-  memset(my_class_isa, 0x77, sizeof(Isa));
-  my_class_isa->class_name = "MyClass";
-
-  MyClass *my_object = (MyClass *)malloc(sizeof(MyClass));
-  memset(my_object, 0x88, sizeof(MyClass));
-  my_object->isa = my_class_isa;
-  my_object->data = 42;
-
-  my_object->print_my_class_name();
-  // CHECK-SCRIBBLE: class name: MyClass
-  // CHECK-NOSCRIBBLE: class name: MyClass
-
-  free(my_object);
-
-  my_object->print_my_class_name();
-  // CHECK-NOSCRIBBLE: class name: MyClass
-  // CHECK-SCRIBBLE: isa = {{(0x)?}}{{5555555555555555|55555555}}
-
-  fprintf(stderr, "okthxbai!\n");
-  // CHECK-SCRIBBLE: okthxbai!
-  // CHECK-NOSCRIBBLE: okthxbai!
-  free(my_class_isa);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-darwin.cc (removed)
@@ -1,36 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t -framework Foundation
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// Check that suppressing the interceptor by name works.
-// RUN: echo "interceptor_name:memmove" > %t.supp
-// RUN: echo "interceptor_name:memcpy" >> %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// Check that suppressing by interceptor name works even without the symbolizer
-// RUN: %env_asan_opts=suppressions='"%t.supp"':symbolize=false %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// Check that suppressing all reports from a library works.
-// RUN: echo "interceptor_via_lib:CoreFoundation" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// Check that suppressing library works even without the symbolizer.
-// RUN: %env_asan_opts=suppressions='"%t.supp"':symbolize=false %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-#include <CoreFoundation/CoreFoundation.h>
-
-int main() {
-  char *a = (char *)malloc(6);
-  strcpy(a, "hello");
-  CFStringRef str =
-      CFStringCreateWithBytes(kCFAllocatorDefault, (unsigned char *)a, 10,
-                              kCFStringEncodingUTF8, FALSE); // BOOM
-  fprintf(stderr, "Ignored.\n");
-  free(a);
-  CFRelease(str);
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-buffer-overflow
-// CHECK-CRASH-NOT: Ignored.
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-buffer-overflow
-// CHECK-IGNORE: Ignored.

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-function.cc (removed)
@@ -1,28 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// RUN: echo "interceptor_via_fun:crash_function" > %t.supp
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void crash_function() {
-  char *a = (char *)malloc(6);
-  free(a);
-  size_t len = strlen(a); // BOOM
-  fprintf(stderr, "strlen ignored, len = %zu\n", len);
-}
-
-int main() {
-  crash_function();
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-use-after-free
-// CHECK-CRASH-NOT: strlen ignored
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-use-after-free
-// CHECK-IGNORE: strlen ignored

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/suppressions-sandbox.cc (removed)
@@ -1,30 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t -framework Foundation
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// Check that suppressing a function name works within a no-fork sandbox
-// RUN: echo "interceptor_via_fun:CFStringCreateWithBytes" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' \
-// RUN:   sandbox-exec -p '(version 1)(allow default)(deny process-fork)' \
-// RUN:   %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// sandbox-exec isn't available on iOS
-// UNSUPPORTED: ios
-
-#include <CoreFoundation/CoreFoundation.h>
-
-int main() {
-  char *a = (char *)malloc(6);
-  strcpy(a, "hello");
-  CFStringRef str =
-      CFStringCreateWithBytes(kCFAllocatorDefault, (unsigned char *)a, 10,
-                              kCFStringEncodingUTF8, FALSE);  // BOOM
-  fprintf(stderr, "Ignored.\n");
-  free(a);
-  CFRelease(str);
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-buffer-overflow
-// CHECK-CRASH-NOT: Ignored.
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-buffer-overflow
-// CHECK-IGNORE: Ignored.

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc (removed)
@@ -1,27 +0,0 @@
-// Make sure ASan removes the runtime library from DYLD_INSERT_LIBRARIES before
-// executing other programs.
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: %clangxx %p/../Helpers/echo-env.cc -o %t-echo-env
-// RUN: %clangxx -DSHARED_LIB %s \
-// RUN:     -dynamiclib -o %t-darwin-dummy-shared-lib-so.dylib
-
-// Make sure DYLD_INSERT_LIBRARIES doesn't contain the runtime library before
-// execl().
-
-// RUN: %run %t %t-echo-env >/dev/null 2>&1
-// RUN: %env DYLD_INSERT_LIBRARIES=%t-darwin-dummy-shared-lib-so.dylib \
-// RUN:     %run %t %t-echo-env 2>&1 | FileCheck %s || exit 1
-
-// UNSUPPORTED: ios
-
-#if !defined(SHARED_LIB)
-#include <unistd.h>
-int main(int argc, char *argv[]) {
-  execl(argv[1], argv[1], "DYLD_INSERT_LIBRARIES", NULL);
-  // CHECK:  {{DYLD_INSERT_LIBRARIES = .*darwin-dummy-shared-lib-so.dylib.*}}
-  return 0;
-}
-#else  // SHARED_LIB
-void foo() {}
-#endif  // SHARED_LIB

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cpp Mon Aug  5 09:48:12 2019
@@ -2,7 +2,7 @@
 // executing other programs.
 
 // RUN: %clangxx_asan %s -o %t
-// RUN: %clangxx %p/../Helpers/echo-env.cc -o %t-echo-env
+// RUN: %clangxx %p/../Helpers/echo-env.cpp -o %t-echo-env
 // RUN: %clangxx -DSHARED_LIB %s \
 // RUN:     -dynamiclib -o %t-darwin-dummy-shared-lib-so.dylib
 

Removed: compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clangxx_asan %s -o %t
-// RUN: %env_asan_opts=print_module_map=1                 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=print_module_map=2                 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan %s -o %t -fsanitize-recover=address
-// RUN: %env_asan_opts=print_module_map=2:halt_on_error=0     %run %t 2>&1 | FileCheck %s
-
-// We can't run system("otool") in the simulator.
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(int argc, char *argv[]) {
-  char buf[2048];
-  snprintf(buf, sizeof(buf), "otool -l %s 1>&2", argv[0]);
-  system(buf);
-  // CHECK: cmd LC_UUID
-  // CHECK-NEXT: cmdsize 24
-  // CHECK-NEXT: uuid [[UUID:[0-9A-F-]{36}]]
-
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  char mybuf[10];
-  memcpy(mybuf, x, 10);
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK: Process module map:
-  // CHECK: uuid.cc.tmp {{.*}} <[[UUID]]>
-
-  fprintf(stderr, "Done.\n");
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/uuid.cpp Mon Aug  5 09:48:12 2019
@@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
   memcpy(mybuf, x, 10);
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK: Process module map:
-  // CHECK: uuid.cc.tmp {{.*}} <[[UUID]]>
+  // CHECK: uuid.cpp.tmp {{.*}} <[[UUID]]>
 
   fprintf(stderr, "Done.\n");
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/blacklist-extra.cc (removed)
@@ -1,5 +0,0 @@
-// This function is broken, but this file is blacklisted
-int externalBrokenFunction(int argc) {
-  char x[10] = {0};
-  return x[argc * 10];  // BOOM
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc (removed)
@@ -1,19 +0,0 @@
-// Helper binary for
-// lit_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
-// Prints the environment variable with the given name.
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
-  if (argc != 2) {
-    printf("Usage: %s ENVNAME\n", argv[0]);
-    exit(1);
-  }
-  const char *value = getenv(argv[1]);
-  if (value) {
-    printf("%s = %s\n", argv[1], value);
-  } else {
-    printf("%s not set.\n", argv[1]);
-  }
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/echo-env.cpp Mon Aug  5 09:48:12 2019
@@ -1,5 +1,5 @@
 // Helper binary for
-// lit_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
+// lit_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cpp
 // Prints the environment variable with the given name.
 #include <stdio.h>
 #include <stdlib.h>

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/init-order-atexit-extra.cc (removed)
@@ -1,16 +0,0 @@
-#include <stdio.h>
-
-class C {
- public:
-  C() { value = 42; }
-  ~C() { }
-  int value;
-};
-
-C c;
-
-void AccessC() {
-  printf("C value: %d\n", c.value);
-}
-
-int main() { return 0; }

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra.cc (removed)
@@ -1,15 +0,0 @@
-int zero_init() { return 0; }
-int badGlobal = zero_init();
-int readBadGlobal() { return badGlobal; }
-
-namespace badNamespace {
-class BadClass {
- public:
-  BadClass() { value = 0; }
-  int value;
-};
-// Global object with non-trivial constructor.
-BadClass bad_object;
-}  // namespace badNamespace
-
-int accessBadObject() { return badNamespace::bad_object.value; }

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist-extra2.cc (removed)
@@ -1,4 +0,0 @@
-int zero_init();
-int badSrcGlobal = zero_init();
-int readBadSrcGlobal() { return badSrcGlobal; }
-

Modified: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist.txt?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist.txt (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-blacklist.txt Mon Aug  5 09:48:12 2019
@@ -1,3 +1,3 @@
 global:*badGlobal*=init
 type:*badNamespace::BadClass*=init
-src:*initialization-blacklist-extra2.cc=init
+src:*initialization-blacklist-extra2.cpp=init

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra.cc (removed)
@@ -1,5 +0,0 @@
-// This file simply declares a dynamically initialized var by the name of 'y'.
-int initY() {
-  return 5;
-}
-int y = initY();

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-bug-extra2.cc (removed)
@@ -1,6 +0,0 @@
-// 'z' is dynamically initialized global from different TU.
-extern int z;
-int __attribute__((noinline)) initY() {
-  return z + 1;
-}
-int y = initY();

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-constexpr-extra.cc (removed)
@@ -1,3 +0,0 @@
-// Constexpr:
-int getCoolestInteger();
-static int coolest_integer = getCoolestInteger();

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/initialization-nobug-extra.cc (removed)
@@ -1,9 +0,0 @@
-// Linker initialized:
-int getAB();
-static int ab = getAB();
-// Function local statics:
-int countCalls();
-static int one = countCalls();
-// Trivial constructor, non-trivial destructor:
-int getStructWithDtorValue();
-static int val = getStructWithDtorValue();

Removed: compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Helpers/underflow.cc (removed)
@@ -1 +0,0 @@
-int YYY[3]={1,2,3};

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc (removed)
@@ -1,21 +0,0 @@
-// Check that with empty ASAN_OPTIONS, ASan reports on Linux don't crash
-// the process (abort_on_error=0). See also Darwin/abort_on_error.cc.
-
-// RUN: %clangxx_asan %s -o %t
-
-// Intentionally don't inherit the default ASAN_OPTIONS.
-// RUN: env ASAN_OPTIONS="" not %run %t 2>&1 | FileCheck %s
-// When we use lit's default ASAN_OPTIONS, we shouldn't crash either. On Linux
-// lit doesn't set ASAN_OPTIONS anyway.
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-// Android runs with abort_on_error=0
-// UNSUPPORTED: android
-
-#include <stdlib.h>
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/abort_on_error.cpp Mon Aug  5 09:48:12 2019
@@ -1,5 +1,5 @@
 // Check that with empty ASAN_OPTIONS, ASan reports on Linux don't crash
-// the process (abort_on_error=0). See also Darwin/abort_on_error.cc.
+// the process (abort_on_error=0). See also Darwin/abort_on_error.cpp.
 
 // RUN: %clangxx_asan %s -o %t
 

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc (removed)
@@ -1,70 +0,0 @@
-// Test for ASAN_OPTIONS=start_deactivated=1 mode.
-// Main executable is uninstrumented, but linked to ASan runtime. The shared
-// library is instrumented.
-
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx -O0 %s -c -o %t.o
-// RUN: %clangxx_asan -O0 %t.o %libdl -o %t
-
-// RUN: rm -f %t.asan.options.activation-options.cc.tmp
-// RUN: rm -f %t.asan.options.ABCDE
-// RUN: echo "help=1" >%t.asan.options.activation-options.cc.tmp
-
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b %run %t 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-HELP --check-prefix=CHECK-FOUND
-
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=include=%t.asan.options not %run %t 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-NO-HELP --check-prefix=CHECK-MISSING
-
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b not %run %t --fix-name 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-NO-HELP --check-prefix=CHECK-MISSING
-
-// RUN: echo "help=1" >%t.asan.options.ABCDE
-
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b %run %t --fix-name 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-HELP --check-prefix=CHECK-FOUND
-
-// XFAIL: android
-
-#if !defined(SHARED_LIB)
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <string>
-
-#include "sanitizer/asan_interface.h"
-
-typedef void (*Fn)();
-
-int main(int argc, char *argv[]) {
-  std::string path = std::string(argv[0]) + "-so.so";
-
-  if (argc > 1 && strcmp(argv[1], "--fix-name") == 0) {
-    assert(strlen(argv[0]) > 5);
-    strcpy(argv[0], "ABCDE");
-  }
-
-  void *dso = dlopen(path.c_str(), RTLD_NOW);
-  if (!dso) {
-    fprintf(stderr, "dlopen failed: %s\n", dlerror());
-    return 1;
-  }
-
-  return 0;
-}
-#else  // SHARED_LIB
-// Empty: all we need is an ASan shared library constructor.
-#endif  // SHARED_LIB
-
-// CHECK-HELP: Available flags for {{.*}}Sanitizer:
-// CHECK-NO-HELP-NOT: Available flags for {{.*}}Sanitizer:
-// CHECK-FOUND-NOT: Failed to read options
-// CHECK-MISSING: Failed to read options

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cpp Mon Aug  5 09:48:12 2019
@@ -6,9 +6,9 @@
 // RUN: %clangxx -O0 %s -c -o %t.o
 // RUN: %clangxx_asan -O0 %t.o %libdl -o %t
 
-// RUN: rm -f %t.asan.options.activation-options.cc.tmp
+// RUN: rm -f %t.asan.options.activation-options.cpp.tmp
 // RUN: rm -f %t.asan.options.ABCDE
-// RUN: echo "help=1" >%t.asan.options.activation-options.cc.tmp
+// RUN: echo "help=1" >%t.asan.options.activation-options.cpp.tmp
 
 // RUN: %env_asan_opts=start_deactivated=1 \
 // RUN:   ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b %run %t 2>&1 | \

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/aligned_delete_test.cc (removed)
@@ -1,140 +0,0 @@
-// RUN: %clangxx_asan -std=c++1z -faligned-allocation -fsanitize-recover=address -O0 %s -o %t
-// RUN: %env_asan_opts=new_delete_type_mismatch=1:halt_on_error=false:detect_leaks=false %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=new_delete_type_mismatch=0                                        %run %t
-
-// RUN: %clangxx_asan -std=c++1z -faligned-allocation -fsized-deallocation -fsanitize-recover=address -O0 %s -o %t
-// RUN: %env_asan_opts=new_delete_type_mismatch=1:halt_on_error=false:detect_leaks=false %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=new_delete_type_mismatch=0                                        %run %t
-
-#include <stdio.h>
-
-// Define all new/delete to do not depend on the version provided by the
-// platform. The implementation is provided by ASan anyway.
-
-namespace std {
-struct nothrow_t {};
-static const nothrow_t nothrow;
-enum class align_val_t : size_t {};
-}  // namespace std
-
-void *operator new(size_t);
-void *operator new[](size_t);
-void *operator new(size_t, std::nothrow_t const&);
-void *operator new[](size_t, std::nothrow_t const&);
-void *operator new(size_t, std::align_val_t);
-void *operator new[](size_t, std::align_val_t);
-void *operator new(size_t, std::align_val_t, std::nothrow_t const&);
-void *operator new[](size_t, std::align_val_t, std::nothrow_t const&);
-
-void operator delete(void*) throw();
-void operator delete[](void*) throw();
-void operator delete(void*, std::nothrow_t const&);
-void operator delete[](void*, std::nothrow_t const&);
-void operator delete(void*, size_t) throw();
-void operator delete[](void*, size_t) throw();
-void operator delete(void*, std::align_val_t) throw();
-void operator delete[](void*, std::align_val_t) throw();
-void operator delete(void*, std::align_val_t, std::nothrow_t const&);
-void operator delete[](void*, std::align_val_t, std::nothrow_t const&);
-void operator delete(void*, size_t, std::align_val_t) throw();
-void operator delete[](void*, size_t, std::align_val_t) throw();
-
-
-template<typename T>
-inline T* break_optimization(T *arg) {
-  __asm__ __volatile__("" : : "r" (arg) : "memory");
-  return arg;
-}
-
-
-struct S12 { int a, b, c; };
-struct alignas(128) S12_128 { int a, b, c; };
-struct alignas(256) S12_256 { int a, b, c; };
-struct alignas(512) S1024_512 { char a[1024]; };
-struct alignas(1024) S1024_1024 { char a[1024]; };
-
-
-int main(int argc, char **argv) {
-  // Check the mismatched calls only, all the valid cases are verified in
-  // test/sanitizer_common/TestCases/Linux/new_delete_test.cpp.
-
-  operator delete(break_optimization(new S12_128), std::nothrow);
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   128 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  operator delete(break_optimization(new S12_128), sizeof(S12_128));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   128 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  operator delete[](break_optimization(new S12_128[100]), std::nothrow);
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   128 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  operator delete[](break_optimization(new S12_128[100]), sizeof(S12_128[100]));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   128 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  // Various mismatched alignments.
-
-  delete break_optimization(reinterpret_cast<S12*>(new S12_256));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   256 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  delete break_optimization(reinterpret_cast<S12_256*>(new S12));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   default-aligned;
-  // CHECK:  alignment of the deallocated type: 256 bytes.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  delete break_optimization(reinterpret_cast<S12_128*>(new S12_256));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   256 bytes;
-  // CHECK:  alignment of the deallocated type: 128 bytes.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  delete [] break_optimization(reinterpret_cast<S12*>(new S12_256[100]));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   256 bytes;
-  // CHECK:  alignment of the deallocated type: default-aligned.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  delete [] break_optimization(reinterpret_cast<S12_256*>(new S12[100]));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   default-aligned;
-  // CHECK:  alignment of the deallocated type: 256 bytes.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  delete [] break_optimization(reinterpret_cast<S12_128*>(new S12_256[100]));
-  // CHECK: AddressSanitizer: new-delete-type-mismatch
-  // CHECK:  object passed to delete has wrong type:
-  // CHECK:  alignment of the allocated type:   256 bytes;
-  // CHECK:  alignment of the deallocated type: 128 bytes.
-  // CHECK: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-
-  // Push ASan limits, the current limitation is that it cannot differentiate
-  // alignments above 512 bytes.
-  fprintf(stderr, "Checking alignments >= 512 bytes\n");
-  delete break_optimization(reinterpret_cast<S1024_512*>(new S1024_1024));
-  fprintf(stderr, "Done\n");
-  // CHECK: Checking alignments >= 512 bytes
-  // CHECK-NEXT: Done
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc (removed)
@@ -1,88 +0,0 @@
-// Test the behavior of malloc/calloc/realloc when the allocation causes OOM
-// in the secondary allocator.
-// By default (allocator_may_return_null=0) the process should crash.
-// With allocator_may_return_null=1 the allocator should return 0.
-// Set the limit to 20.5T on 64 bits to account for ASan shadow memory,
-// allocator buffers etc. so that the test allocation of ~1T will trigger OOM.
-// Limit this test to Linux since we're relying on allocator internal
-// limits (shadow memory size, allocation limits etc.)
-
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: ulimit -v 22024290304
-// RUN: not %run %t malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-CRASH
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-CRASH
-// RUN: %env_asan_opts=allocator_may_return_null=1     %run %t malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-NULL
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t calloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-CALLOC,CHECK-CRASH
-// RUN: %env_asan_opts=allocator_may_return_null=1     %run %t calloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-CALLOC,CHECK-NULL
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t realloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-REALLOC,CHECK-CRASH
-// RUN: %env_asan_opts=allocator_may_return_null=1     %run %t realloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-REALLOC,CHECK-NULL
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-MALLOC-REALLOC,CHECK-CRASH
-// RUN: %env_asan_opts=allocator_may_return_null=1     %run %t realloc-after-malloc 2>&1 \
-// RUN:   | FileCheck %s --check-prefixes=CHECK-MALLOC-REALLOC,CHECK-NULL
-
-// ASan shadow memory on s390 is too large for this test.
-// AArch64 bots fail on this test.
-// TODO(alekseys): Android lit do not run ulimit on device.
-// REQUIRES: shadow-scale-3
-// UNSUPPORTED: s390,android,aarch64
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-
-int main(int argc, char **argv) {
-  assert(argc == 2);
-  const char *action = argv[1];
-  fprintf(stderr, "%s:\n", action);
-
-  // Allocate just a bit less than max allocation size enforced by ASan's
-  // allocator (currently 1T and 3G).
-  const size_t size =
-#if __LP64__
-      (1ULL << 40) - (1ULL << 30);
-#else
-      (3ULL << 30) - (1ULL << 20);
-#endif
-
-  void *x = 0;
-
-  if (!strcmp(action, "malloc")) {
-    x = malloc(size);
-  } else if (!strcmp(action, "calloc")) {
-    x = calloc(size / 4, 4);
-  } else if (!strcmp(action, "realloc")) {
-    x = realloc(0, size);
-  } else if (!strcmp(action, "realloc-after-malloc")) {
-    char *t = (char*)malloc(100);
-    *t = 42;
-    x = realloc(t, size);
-    assert(*t == 42);
-    free(t);
-  } else {
-    assert(0);
-  }
-
-  // The NULL pointer is printed differently on different systems, while (long)0
-  // is always the same.
-  fprintf(stderr, "x: %lx\n", (long)x);
-  free(x);
-
-  return x != 0;
-}
-
-// CHECK-MALLOC: malloc:
-// CHECK-CALLOC: calloc:
-// CHECK-REALLOC: realloc:
-// CHECK-MALLOC-REALLOC: realloc-after-malloc:
-
-// CHECK-CRASH: SUMMARY: AddressSanitizer: out-of-memory
-// CHECK-NULL: x: 0

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_default_suppressions.cc (removed)
@@ -1,7 +0,0 @@
-// Test that we use the suppressions from __asan_default_suppressions.
-// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
-extern "C" {
-  const char *__asan_default_suppressions() { return "FooBar"; }
-}
-// CHECK: AddressSanitizer: failed to parse suppressions
-int main() {}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_dlopen_test.cc (removed)
@@ -1,17 +0,0 @@
-// Test that dlopen of dynamic runtime is prohibited.
-//
-// RUN: %clangxx %s -DRT=\"%shared_libasan\" -o %t -ldl
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=verify_asan_link_order=true not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=verify_asan_link_order=false %run %t 2>&1
-// REQUIRES: asan-dynamic-runtime
-// XFAIL: android
-
-#include <dlfcn.h>
-
-int main(int argc, char **argv) {
-  dlopen(RT, RTLD_LAZY);
-  return 0;
-}
-
-// CHECK: ASan runtime does not come first in initial library list

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_prelink_test.cc (removed)
@@ -1,29 +0,0 @@
-// Test if asan works with prelink.
-// It does not actually use prelink, but relies on ld's flag -Ttext-segment
-// or gold's flag -Ttext (we try the first flag first, if that fails we
-// try the second flag).
-//
-// RUN: %clangxx_asan -c %s -o %t.o
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 ||\
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext=0x3600000000
-// RUN: %clangxx_asan %t.o %t.so -Wl,-R. -o %t
-// RUN: %env_asan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s
-
-// GNU driver doesn't handle .so files properly.
-// REQUIRES: x86_64-target-arch, shadow-scale-3, Clang
-#if BUILD_SO
-int G;
-int *getG() {
-  return &G;
-}
-#else
-#include <stdio.h>
-extern int *getG();
-int main(int argc, char **argv) {
-  long p = (long)getG();
-  printf("SO mapped at %lx\n", p & ~0xffffffffUL);
-  *getG() = 0;
-}
-#endif
-// CHECK: 0x003000000000, 0x004fffffffff{{.*}} MidMem
-// CHECK: SO mapped at 3600000000

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-1.cc (removed)
@@ -1,30 +0,0 @@
-// Test that non-sanitized executables work with sanitized shared libs
-// and preloaded runtime.
-//
-// RUN: %clangxx -DBUILD_SO=1 -fPIC -shared %s -o %t.so
-// RUN: %clangxx %s %t.so -o %t
-//
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so
-// RUN: env LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: asan-dynamic-runtime
-
-// This way of setting LD_PRELOAD does not work with Android test runner.
-// REQUIRES: !android
-
-#if BUILD_SO
-char dummy;
-void do_access(const void *p) {
-  // CHECK: AddressSanitizer: heap-buffer-overflow
-  dummy = ((const char *)p)[1];
-}
-#else
-#include <stdlib.h>
-extern void do_access(const void *p);
-int main(int argc, char **argv) {
-  void *p = malloc(1);
-  do_access(p);
-  free(p);
-  return 0;
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-2.cc (removed)
@@ -1,24 +0,0 @@
-// Test that preloaded runtime works with unsanitized executables.
-//
-// RUN: %clangxx %s -o %t
-// RUN: env LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: asan-dynamic-runtime
-
-// This way of setting LD_PRELOAD does not work with Android test runner.
-// REQUIRES: !android
-
-#include <stdlib.h>
-
-extern "C" ssize_t write(int fd, const void *buf, size_t count);
-
-void do_access(void *p) {
-  // CHECK: AddressSanitizer: heap-buffer-overflow
-  write(1, p, 2);
-}
-
-int main(int argc, char **argv) {
-  void *p = malloc(1);
-  do_access(p);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_preload_test-3.cc (removed)
@@ -1,36 +0,0 @@
-// Regression test for PR33206
-//
-// RUN: %clang -DDYN=1 -DMALLOC=1 -fPIC -shared %s -o %t-dso1.so
-// RUN: %clang -DDYN=1 -DMALLOC=1 -fPIC -shared %s -o %t-dso2.so %t-dso1.so
-// RUN: %clang %s -o %t-1 %t-dso2.so
-// RUN: env LD_PRELOAD=%shared_libasan %run %t-1 2>&1 | FileCheck %s
-// RUN: %clang -DDYN=1 -DREALLOC=1 -fPIC -shared %s -o %t-dso3.so
-// RUN: %clang -DDYN=1 -DREALLOC=1 -fPIC -shared %s -o %t-dso4.so %t-dso3.so
-// RUN: %clang %s -o %t-2 %t-dso4.so
-// RUN: env LD_PRELOAD=%shared_libasan %run %t-2 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-
-// FIXME: Test regressed while android bot was disabled. Needs investigation.
-// UNSUPPORTED: android
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef DYN
-__attribute__((constructor)) void foo() {
-  void *p;
-#ifdef MALLOC
-  p = malloc(1 << 20);
-#endif
-#ifdef REALLOC
-  p = realloc (0, 1 << 20);
-#endif
-  free(p);
-}
-#else
-int main() {
-  // CHECK: Success
-  printf("Success\n");
-  return 0;
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc (removed)
@@ -1,13 +0,0 @@
-// Test that preloading dynamic runtime to statically sanitized
-// executable is prohibited.
-//
-// RUN: %clangxx_asan_static %s -o %t
-// RUN: env LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: asan-dynamic-runtime
-// XFAIL: android
-
-#include <stdlib.h>
-int main(int argc, char **argv) { return 0; }
-
-// CHECK: Your application is linked against incompatible ASan runtimes

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/asan_rt_confict_test-2.cc (removed)
@@ -1,25 +0,0 @@
-// Test that mixed static/dynamic sanitization of program objects
-// is prohibited.
-//
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %dynamiclib
-// RUN: %clangxx_asan_static %s %ld_flags_rpath_exe -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: asan-dynamic-runtime
-// XFAIL: android
-
-#if BUILD_SO
-char dummy;
-void do_access(const void *p) { dummy = ((const char *)p)[1]; }
-#else
-#include <stdlib.h>
-extern void do_access(const void *p);
-int main(int argc, char **argv) {
-  void *p = malloc(1);
-  do_access(p);
-  free(p);
-  return 0;
-}
-#endif
-
-// CHECK: Your application is linked against incompatible ASan runtimes

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/auto_memory_profile_test.cc (removed)
@@ -1,32 +0,0 @@
-// Tests heap_profile=1.
-// Printing memory profiling only works in the configuration where we can
-// detect leaks.
-// REQUIRES: leak-detection
-//
-// RUN: %clangxx_asan %s -o %t
-// RUN: %env_asan_opts=heap_profile=1 %run %t 2>&1 | FileCheck %s
-#include <sanitizer/common_interface_defs.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-char *sink[1000];
-
-int main() {
-
-  for (int i = 0; i < 3; i++) {
-    const size_t  kSize = 13000000;
-    char *x = new char[kSize];
-    memset(x, 0, kSize);
-    sink[i] = x;
-    sleep(1);
-  }
-}
-
-// CHECK: HEAP PROFILE at RSS
-// CHECK: 13000000 byte(s)
-// CHECK: HEAP PROFILE at RSS
-// CHECK: 26000000 byte(s)
-// CHECK: HEAP PROFILE at RSS
-// CHECK: 39000000 byte(s)

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/bzero.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: !android
-
-#include <assert.h>
-#include <strings.h>
-
-int main(int argc, char *argv[]) {
-  char buf[100];
-  // *& to suppress bzero-to-memset optimization.
-  (*&bzero)(buf, sizeof(buf) + 1);
-  // CHECK:      AddressSanitizer: stack-buffer-overflow
-  // CHECK-NEXT: WRITE of size 101 at
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx_asan -O0 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
-
-#include <stdlib.h>
-
-__attribute__((noinline))
-int boom() {
-  volatile int three = 3;
-  char * volatile s = (char *)malloc(three);
-// CHECK: #1 0x{{.*}} in boom {{.*}}clang_gcc_abi.cc:[[@LINE-1]]
-  return s[three]; //BOOM
-}
-
-__attribute__((naked, noinline)) void gcc_abi() {
-// CHECK: #2 0x{{.*}} in gcc_abi {{.*}}clang_gcc_abi.cc:[[@LINE+1]]
-  asm volatile("str fp, [sp, #-8]!\n\t"
-               "str lr, [sp, #4]\n\t"
-               "add fp, sp, #4\n\t"
-               "bl  boom\n\t"
-               "sub sp, fp, #4\n\t"
-               "ldr fp, [sp]\n\t"
-               "add sp, sp, #4\n\t"
-               "ldr pc, [sp], #4\n\t"
-              );
-}
-
-__attribute__((naked, noinline)) void clang_abi() {
-// CHECK: #3 0x{{.*}} in clang_abi {{.*}}clang_gcc_abi.cc:[[@LINE+1]]
-  asm volatile("push {r11, lr}\n\t"
-               "mov r11, sp\n\t"
-               "bl  gcc_abi\n\t"
-               "add r0, r0, #1\n\t"
-               "pop {r11, pc}\n\t"
-              );
-}
-
-int main() {
-  clang_abi();
-// CHECK: #4 0x{{.*}} in main {{.*}}clang_gcc_abi.cc:[[@LINE-1]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cpp Mon Aug  5 09:48:12 2019
@@ -11,12 +11,12 @@ __attribute__((noinline))
 int boom() {
   volatile int three = 3;
   char * volatile s = (char *)malloc(three);
-// CHECK: #1 0x{{.*}} in boom {{.*}}clang_gcc_abi.cc:[[@LINE-1]]
+// CHECK: #1 0x{{.*}} in boom {{.*}}clang_gcc_abi.cpp:[[@LINE-1]]
   return s[three]; //BOOM
 }
 
 __attribute__((naked, noinline)) void gcc_abi() {
-// CHECK: #2 0x{{.*}} in gcc_abi {{.*}}clang_gcc_abi.cc:[[@LINE+1]]
+// CHECK: #2 0x{{.*}} in gcc_abi {{.*}}clang_gcc_abi.cpp:[[@LINE+1]]
   asm volatile("str fp, [sp, #-8]!\n\t"
                "str lr, [sp, #4]\n\t"
                "add fp, sp, #4\n\t"
@@ -29,7 +29,7 @@ __attribute__((naked, noinline)) void gc
 }
 
 __attribute__((naked, noinline)) void clang_abi() {
-// CHECK: #3 0x{{.*}} in clang_abi {{.*}}clang_gcc_abi.cc:[[@LINE+1]]
+// CHECK: #3 0x{{.*}} in clang_abi {{.*}}clang_gcc_abi.cpp:[[@LINE+1]]
   asm volatile("push {r11, lr}\n\t"
                "mov r11, sp\n\t"
                "bl  gcc_abi\n\t"
@@ -40,5 +40,5 @@ __attribute__((naked, noinline)) void cl
 
 int main() {
   clang_abi();
-// CHECK: #4 0x{{.*}} in main {{.*}}clang_gcc_abi.cc:[[@LINE-1]]
+// CHECK: #4 0x{{.*}} in main {{.*}}clang_gcc_abi.cpp:[[@LINE-1]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc (removed)
@@ -1,44 +0,0 @@
-// Regression test for:
-// http://code.google.com/p/address-sanitizer/issues/detail?id=37
-
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && %run %t | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t | FileCheck %s
-
-#include <stdio.h>
-#include <sched.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-int Child(void *arg) {
-  char x[32] = {0};  // Stack gets poisoned.
-  printf("Child:  %p\n", x);
-  _exit(1);  // NoReturn, stack will remain unpoisoned unless we do something.
-}
-
-int main(int argc, char **argv) {
-  const int kStackSize = 1 << 20;
-  char __attribute__((aligned(16))) child_stack[kStackSize + 1];
-  char *sp = child_stack + kStackSize;  // Stack grows down.
-  printf("Parent: %p\n", sp);
-  pid_t clone_pid = clone(Child, sp, CLONE_FILES | CLONE_VM, NULL);
-  int status;
-  pid_t wait_result = waitpid(clone_pid, &status, __WCLONE);
-  if (wait_result < 0) {
-    perror("waitpid");
-    return 0;
-  }
-  if (wait_result == clone_pid && WIFEXITED(status)) {
-    // Make sure the child stack was indeed unpoisoned.
-    for (int i = 0; i < kStackSize; i++)
-      child_stack[i] = i;
-    int ret = child_stack[argc - 1];
-    printf("PASSED\n");
-    // CHECK: PASSED
-    return ret;
-  }
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-missing.cc (removed)
@@ -1,92 +0,0 @@
-// Test for "sancov.py missing ...".
-
-// First case: coverage from executable. main() is called on every code path.
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t -DFOOBAR -DMAIN
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-// RUN: cd %t-dir
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t
-// RUN: %sancov print *.sancov > main.txt
-// RUN: rm *.sancov
-// RUN: count 1 < main.txt
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
-// RUN: %sancov print *.sancov > foo.txt
-// RUN: rm *.sancov
-// RUN: count 3 < foo.txt
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
-// RUN: %sancov print *.sancov > bar.txt
-// RUN: rm *.sancov
-// RUN: count 4 < bar.txt
-// RUN: %sancov missing %t < foo.txt > foo-missing.txt
-// RUN: sort main.txt foo-missing.txt -o foo-missing-with-main.txt
-// The "missing from foo" set may contain a few bogus PCs from the sanitizer
-// runtime, but it must include the entire "bar" code path as a subset. Sorted
-// lists can be tested for set inclusion with diff + grep.
-// RUN: diff bar.txt foo-missing-with-main.txt > %t.log || true
-// RUN: not grep "^<" %t.log
-
-// Second case: coverage from DSO.
-// cd %t-dir
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %dynamiclib -DFOOBAR -shared -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %dynamiclib -o %t -DMAIN
-// RUN: cd ..
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-// RUN: cd %t-dir
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x
-// RUN: %sancov print %xdynamiclib_filename.*.sancov > foo.txt
-// RUN: rm *.sancov
-// RUN: count 2 < foo.txt
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x
-// RUN: %sancov print %xdynamiclib_filename.*.sancov > bar.txt
-// RUN: rm *.sancov
-// RUN: count 3 < bar.txt
-// RUN: %sancov missing %dynamiclib < foo.txt > foo-missing.txt
-// RUN: diff bar.txt foo-missing.txt > %t.log || true
-// RUN: not grep "^<" %t.log
-
-// FIXME %sancov GetInstrumentedPCs relies on objdump -d to
-// obtain the number of instrumented PCs.  The i386
-// %dynamiclib has .plt entries that are not recognized by
-// objdump,
-// "sancov.py: found 0 instrumented PCs in *.so",
-// causing AddressSanitizer-i386-linux to fail.
-// Change it back to x86-target-arch after %sancov switches to a more robust approach.
-
-// REQUIRES: x86_64-target-arch
-// XFAIL: android
-
-#include <stdio.h>
-
-void foo1();
-void foo2();
-void bar1();
-void bar2();
-void bar3();
-
-#if defined(FOOBAR)
-void foo1() { fprintf(stderr, "foo1\n"); }
-void foo2() { fprintf(stderr, "foo2\n"); }
-
-void bar1() { fprintf(stderr, "bar1\n"); }
-void bar2() { fprintf(stderr, "bar2\n"); }
-void bar3() { fprintf(stderr, "bar3\n"); }
-#endif
-
-#if defined(MAIN)
-int main(int argc, char **argv) {
-  switch (argc) {
-    case 1:
-      break;
-    case 2:
-      foo1();
-      foo2();
-      break;
-    case 3:
-      bar1();
-      bar2();
-      bar3();
-      break;
-  }
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/cuda_test.cc (removed)
@@ -1,35 +0,0 @@
-// Emulate the behavior of the NVIDIA CUDA driver
-// that mmaps memory inside the asan's shadow gap.
-//
-// REQUIRES: x86_64-target-arch, shadow-scale-3
-//
-// RUN: %clangxx_asan %s -o %t
-// RUN: not %env_asan_opts=protect_shadow_gap=1 %t 2>&1 | FileCheck %s  --check-prefix=CHECK-PROTECT1
-// RUN: not                                     %t 2>&1 | FileCheck %s  --check-prefix=CHECK-PROTECT1
-// RUN: not %env_asan_opts=protect_shadow_gap=0 %t 2>&1 | FileCheck %s  --check-prefix=CHECK-PROTECT0
-#include <assert.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <stdint.h>
-
-#include "sanitizer/asan_interface.h"
-
-int main(void) {
-  uintptr_t Base = 0x200000000;
-  uintptr_t Size = 0x1100000000;
-  void *addr =
-      mmap((void *)Base, Size, PROT_READ | PROT_WRITE,
-           MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, 0, 0);
-  assert(addr == (void*)Base);
-  // Make sure we can access memory in shadow gap.
-  // W/o protect_shadow_gap=0 we should fail here.
-  for (uintptr_t Addr = Base; Addr < Base + Size; Addr += Size / 100)
-    *(char*)Addr = 1;
-  // CHECK-PROTECT1: AddressSanitizer: SEGV on unknown address 0x0000bfff8000
-
-  // Poison a part of gap's shadow:
-  __asan_poison_memory_region((void*)Base, 4096);
-  // Now we should fail with use-after-poison.
-  *(char*)(Base + 1234) = 1;
-  // CHECK-PROTECT0: AddressSanitizer: use-after-poison on address 0x0002000004d2
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc (removed)
@@ -1,41 +0,0 @@
-// Check that --gc-sections does not throw away (or localize) parts of sanitizer
-// interface.
-// RUN: %clang_asan %s -Wl,--gc-sections -ldl -o %t
-// RUN: %clang_asan %s -DBUILD_SO -fPIC -o %t-so.so -shared
-// RUN: %run %t 2>&1
-
-// REQUIRES: asan-64-bits
-
-#ifndef BUILD_SO
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char *argv[]) {
-  char path[4096];
-  snprintf(path, sizeof(path), "%s-so.so", argv[0]);
-
-  void *handle = dlopen(path, RTLD_LAZY);
-  if (!handle) fprintf(stderr, "%s\n", dlerror());
-  assert(handle != 0);
-
-  typedef void (*F)();
-  F f = (F)dlsym(handle, "call_rtl_from_dso");
-  printf("%s\n", dlerror());
-  assert(dlerror() == 0);
-  f();
-  
-  dlclose(handle);
-  return 0;
-}
-
-#else // BUILD_SO
-
-#include <sanitizer/asan_interface.h>
-extern "C" void call_rtl_from_dso() {
-  volatile int32_t x;
-  volatile int32_t y = __sanitizer_unaligned_load32((void *)&x);
-}
-
-#endif // BUILD_SO

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-bfd.cc (removed)
@@ -1,18 +0,0 @@
-// Test that gc-sections-friendly instrumentation of globals does not introduce
-// false negatives with the BFD linker.
-// RUN: %clangxx_asan -fuse-ld=bfd -Wl,-gc-sections -ffunction-sections -fdata-sections -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <string.h>
-int main(int argc, char **argv) {
-  static char XXX[10];
-  static char YYY[10];
-  static char ZZZ[10];
-  memset(XXX, 0, 10);
-  memset(YYY, 0, 10);
-  memset(ZZZ, 0, 10);
-  int res = YYY[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at}}
-  // CHECK: {{located 0 bytes to the right of global variable}}
-  res += XXX[argc] + ZZZ[argc];
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/global-overflow-lld.cc (removed)
@@ -1,19 +0,0 @@
-// Test that gc-sections-friendly instrumentation of globals does not introduce
-// false negatives with the LLD linker.
-// RUN: %clangxx_asan -fuse-ld=lld -Wl,-gc-sections -ffunction-sections -fdata-sections -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: lld
-
-#include <string.h>
-int main(int argc, char **argv) {
-  static char XXX[10];
-  static char YYY[10];
-  static char ZZZ[10];
-  memset(XXX, 0, 10);
-  memset(YYY, 0, 10);
-  memset(ZZZ, 0, 10);
-  int res = YYY[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at}}
-  // CHECK: {{located 0 bytes to the right of global variable}}
-  res += XXX[argc] + ZZZ[argc];
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/globals-gc-sections-lld.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0
-// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=1
-
-// https://code.google.com/p/address-sanitizer/issues/detail?id=260
-// REQUIRES: lld
-
-int undefined();
-
-// On i386 clang adds --export-dynamic when linking with ASan, which adds all
-// non-hidden globals to GC roots.
-__attribute__((visibility("hidden"))) int (*unused)() = undefined;
-
-int main() {
-        return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/init-order-dlopen.cc (removed)
@@ -1,47 +0,0 @@
-// Regression test for
-// https://code.google.com/p/address-sanitizer/issues/detail?id=178
-
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s %libdl -Wl,--export-dynamic -o %t
-// RUN: %env_asan_opts=strict_init_order=true %run %t 2>&1
-
-// dlopen() can not be intercepted on Android, making strict_init_order nearly
-// useless there.
-// UNSUPPORTED: android
-
-#if defined(SHARED_LIB)
-#include <stdio.h>
-
-struct Bar {
-  Bar(int val) : val(val) { printf("Bar::Bar(%d)\n", val); }
-  int val;
-};
-
-int get_foo_val();
-Bar global_bar(get_foo_val());
-#else  // SHARED LIB
-#include <dlfcn.h>
-#include <stdio.h>
-#include <string>
-struct Foo {
-  Foo() : val(42) { printf("Foo::Foo()\n"); }
-  int val;
-};
-
-Foo global_foo;
-
-int get_foo_val() {
-  return global_foo.val;
-}
-
-int main(int argc, char *argv[]) {
-  std::string path = std::string(argv[0]) + "-so.so";
-  void *handle = dlopen(path.c_str(), RTLD_NOW);
-  if (!handle) {
-    printf("error in dlopen(): %s\n", dlerror());
-    return 1;
-  }
-  printf("%d\n", get_foo_val());
-  return 0;
-}
-#endif  // SHARED_LIB

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/init_fini_sections.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clangxx_asan %s -o %t && %run %t | FileCheck %s
-
-#include <stdio.h>
-
-int c = 0;
-
-static void foo() {
-  ++c;
-}
-
-static void fini() {
-  printf("fini\n");
-}
-
-int main() {
-  printf("c=%d\n", c);
-  return 0;
-}
-
-__attribute__((section(".preinit_array")))
-void (*call_foo)(void) = &foo;
-
-__attribute__((section(".init_array")))
-void (*call_foo_2)(void) = &foo;
-
-__attribute__((section(".fini_array")))
-void (*call_foo_3)(void) = &fini;
-
-// CHECK: c=2
-// CHECK: fini

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc (removed)
@@ -1,36 +0,0 @@
-// Test to make sure basic initialization order errors are caught.
-// Check that on Linux initialization order bugs are caught
-// independently on order in which we list source files (if we specify
-// strict init-order checking).
-
-// RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t
-// RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t
-// RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
-
-// Do not test with optimization -- the error may be optimized away.
-
-#include <cstdio>
-
-// 'y' is a dynamically initialized global residing in a different TU.  This
-// dynamic initializer will read the value of 'y' before main starts.  The
-// result is undefined behavior, which should be caught by initialization order
-// checking.
-extern int y;
-int __attribute__((noinline)) initX() {
-  return y + 1;
-  // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
-  // CHECK: {{READ of size .* at 0x.* thread T0}}
-  // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cc:}}[[@LINE-3]]
-  // CHECK: {{0x.* is located 0 bytes inside of global variable .*y.*}}
-}
-
-// This initializer begins our initialization order problems.
-static int x = initX();
-
-int main() {
-  // ASan should have caused an exit before main runs.
-  printf("PASS\n");
-  // CHECK-NOT: PASS
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/initialization-bug-any-order.cpp Mon Aug  5 09:48:12 2019
@@ -3,9 +3,9 @@
 // independently on order in which we list source files (if we specify
 // strict init-order checking).
 
-// RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t
+// RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cpp -o %t
 // RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t
+// RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cpp %s -o %t
 // RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
 
 // Do not test with optimization -- the error may be optimized away.
@@ -21,7 +21,7 @@ int __attribute__((noinline)) initX() {
   return y + 1;
   // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
   // CHECK: {{READ of size .* at 0x.* thread T0}}
-  // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cc:}}[[@LINE-3]]
+  // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cpp:}}[[@LINE-3]]
   // CHECK: {{0x.* is located 0 bytes inside of global variable .*y.*}}
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/interception_malloc_test.cc (removed)
@@ -1,23 +0,0 @@
-// ASan interceptor can be accessed with __interceptor_ prefix.
-
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-extern "C" void *__interceptor_malloc(size_t size);
-extern "C" void *malloc(size_t size) {
-  write(2, "malloc call\n", sizeof("malloc call\n") - 1);
-  return __interceptor_malloc(size);
-}
-
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return (int)strtol(x, 0, 10);
-  // CHECK: malloc call
-  // CHECK: heap-use-after-free
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/interception_readdir_r_test.cc (removed)
@@ -1,65 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-//
-// RUN: %clangxx_asan -O0 %s -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-//
-// RUN: %clangxx_asan -O0 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -D_FILE_OFFSET_BITS=64 -DTEMP_DIR='"'"%t-dir"'"' -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <dirent.h>
-#include <memory.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-
-int main() {
-  // Ensure the readdir_r interceptor doesn't erroneously mark the entire dirent
-  // as written when the end of the directory pointer is reached.
-  fputs("test1: reading the " TEMP_DIR " directory...\n", stderr);
-  DIR *d = opendir(TEMP_DIR);
-  struct dirent *result = (struct dirent *)(0xfeedbeef);
-  // We assume the temp dir for this test doesn't have crazy long file names.
-  char entry_buffer[4096];
-  memset(entry_buffer, 0xab, sizeof(entry_buffer));
-  unsigned count = 0;
-  do {
-    // Stamp the entry struct to try to trick the interceptor.
-    ((struct dirent *)entry_buffer)->d_reclen = 9999;
-    if (readdir_r(d, (struct dirent *)entry_buffer, &result) != 0)
-      abort();
-    ++count;
-  } while (result != NULL);
-  fprintf(stderr, "read %d entries\n", count);
-  closedir(d);
-  // CHECK: test1: reading the {{.*}} directory...
-  // CHECK-NOT: stack-buffer-overflow
-  // CHECK: read {{.*}} entries
-
-  // Ensure the readdir64_r interceptor doesn't have the bug either.
-  fputs("test2: reading the " TEMP_DIR " directory...\n", stderr);
-  d = opendir(TEMP_DIR);
-  struct dirent64 *result64;
-  memset(entry_buffer, 0xab, sizeof(entry_buffer));
-  count = 0;
-  do {
-    // Stamp the entry struct to try to trick the interceptor.
-    ((struct dirent64 *)entry_buffer)->d_reclen = 9999;
-    if (readdir64_r(d, (struct dirent64 *)entry_buffer, &result64) != 0)
-      abort();
-    ++count;
-  } while (result64 != NULL);
-  fprintf(stderr, "read %d entries\n", count);
-  closedir(d);
-  // CHECK: test2: reading the {{.*}} directory...
-  // CHECK-NOT: stack-buffer-overflow
-  // CHECK: read {{.*}} entries
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/interception_test.cc (removed)
@@ -1,22 +0,0 @@
-// ASan interceptor can be accessed with __interceptor_ prefix.
-
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-#include <stdlib.h>
-#include <stdio.h>
-
-extern "C" long __interceptor_strtol(const char *nptr, char **endptr, int base);
-extern "C" long strtol(const char *nptr, char **endptr, int base) {
-  fprintf(stderr, "my_strtol_interceptor\n");
-  return __interceptor_strtol(nptr, endptr, base);
-}
-
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return (int)strtol(x, 0, 10);
-  // CHECK: my_strtol_interceptor
-  // CHECK: heap-use-after-free
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/interface_symbols_linux.cc (removed)
@@ -1,32 +0,0 @@
-// Check the presence of interface symbols in compiled file.
-
-// RUN: %clangxx_asan -O2 %s -o %t.exe
-// RUN: nm -D %t.exe | grep " [TWw] "                                          \
-// RUN:  | grep -o "\(__asan_\|__ubsan_\|__sancov_\|__sanitizer_\)[^ ]*"       \
-// RUN:  | grep -v "__sanitizer_syscall"                                       \
-// RUN:  | grep -v "__sanitizer_weak_hook"                                     \
-// RUN:  | grep -v "__sancov_lowest_stack"                                     \
-// RUN:  | sed -e "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \
-// RUN:  > %t.exports
-//
-// RUN: grep -e "INTERFACE_\(WEAK_\)\?FUNCTION"                                \
-// RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
-// RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface_posix.inc \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | grep -v "__sanitizer_weak_hook"                                     \
-// RUN:  | sed -e "s/.*(//" -e "s/).*//" > %t.imports
-//
-// RUN: cat %t.imports | sort | uniq > %t.imports-sorted
-// RUN: cat %t.exports | sort | uniq > %t.exports-sorted
-//
-// RUN: echo
-// RUN: echo "=== NOTE === If you see a mismatch below, please update sanitizer_interface.inc files."
-// RUN: diff %t.imports-sorted %t.exports-sorted
-//
-// FIXME: nm -D on powerpc somewhy shows ASan interface symbols residing
-// in "initialized data section".
-// REQUIRES: x86-target-arch,asan-static-runtime
-
-int main() { return 0; }

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/kernel-area.cc (removed)
@@ -1,23 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-//
-// Test that kernel area is not sanitized on 32-bit machines.
-//
-// RUN: %clangxx_asan %s -o %t
-// RUN: %env_asan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%kernel_bits
-// RUN: %env_asan_opts=verbosity=1:full_address_space=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%kernel_bits
-// RUN: %env_asan_opts=verbosity=1:full_address_space=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-kernel-64-bits
-//
-// CHECK-kernel-32-bits: || `[0x38{{0+}}, 0xb{{f+}}]` || HighMem    ||
-// CHECK-kernel-32-bits: || `[0x27{{0+}}, 0x37{{f+}}]` || HighShadow ||
-// CHECK-kernel-32-bits: || `[0x24{{0+}}, 0x26{{f+}}]` || ShadowGap  ||
-//
-// CHECK-kernel-64-bits: || `[0x4{{0+}}, 0x{{f+}}]` || HighMem    ||
-// CHECK-kernel-64-bits: || `[0x28{{0+}}, 0x3{{f+}}]` || HighShadow ||
-// CHECK-kernel-64-bits: || `[0x24{{0+}}, 0x27{{f+}}]` || ShadowGap  ||
-//
-// REQUIRES: i386-target-arch, shadow-scale-3
-
-int main() {
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/leak.cc (removed)
@@ -1,16 +0,0 @@
-// Minimal test for LeakSanitizer+AddressSanitizer.
-// REQUIRES: leak-detection
-//
-// RUN: %clangxx_asan  %s -o %t
-// RUN: %env_asan_opts=detect_leaks=1 not %run %t  2>&1 | FileCheck %s
-// RUN: not %run %t  2>&1 | FileCheck %s
-// RUN: %env_asan_opts=detect_leaks=0     %run %t
-#include <stdio.h>
-int *t;
-
-int main(int argc, char **argv) {
-  t = new int[argc - 1];
-  printf("t: %p\n", t);
-  t = 0;
-}
-// CHECK: LeakSanitizer: detected memory leaks

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/leak_check_segv.cc (removed)
@@ -1,23 +0,0 @@
-// Test that SIGSEGV during leak checking does not crash the process.
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: leak-detection
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/mman.h>
-#include <sanitizer/lsan_interface.h>
-
-char data[10 * 1024 * 1024];
-
-int main() {
-  void *p = malloc(10 * 1024 * 1024);
-  // surprise-surprise!
-  mprotect((void*)(((unsigned long)p + 4095) & ~4095), 16 * 1024, PROT_NONE);
-  mprotect((void*)(((unsigned long)data + 4095) & ~4095), 16 * 1024, PROT_NONE);
-  __lsan_do_leak_check();
-  fprintf(stderr, "DONE\n");
-}
-
-// CHECK: Tracer caught signal 11
-// CHECK: LeakSanitizer has encountered a fatal error
-// CHECK: HINT: For debugging, try setting {{.*}} LSAN_OPTIONS
-// CHECK-NOT: DONE

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/local_alias.cc (removed)
@@ -1,36 +0,0 @@
-// Test that mixing instrumented and non-instrumented code doesn't lead to crash.
-// Build two modules (one is instrumented, another is not) that have globals
-// with same names. Check, that ASan doesn't crash with CHECK failure or
-// false positive global-buffer-overflow due to sanitized library poisons
-// globals from non-sanitized one.
-//
-// RUN: %clangxx_asan -DBUILD_INSTRUMENTED_DSO=1 -fPIC -shared -mllvm -asan-use-private-alias %s -o %dynamiclib1
-// RUN: %clangxx -DBUILD_UNINSTRUMENTED_DSO=1 -fPIC -shared %s -o %dynamiclib2
-// RUN: %clangxx %s -c -mllvm -asan-use-private-alias -o %t.o
-// RUN: %clangxx_asan %t.o %ld_flags_rpath_exe2 %ld_flags_rpath_exe1 -o %t-EXE
-// RUN: %run %t-EXE
-
-#if defined (BUILD_INSTRUMENTED_DSO)
-long h = 15;
-long f = 4;
-long foo(long *p) {
-  return *p;
-}
-#elif defined (BUILD_UNINSTRUMENTED_DSO)
-long foo(long *);
-long h = 12;
-long i = 13;
-long f = 5;
-
-int bar() {
-  if (foo(&f) != 5 || foo(&h) != 12 || foo(&i) != 13)
-    return 1;
-  return 0;
-}
-#else
-extern int bar();
-
-int main() {
-  return bar();
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/long-object-path.cc (removed)
@@ -1,7 +0,0 @@
-// RUN: mkdir -p %T/a-long-directory-name-to-test-allocations-for-exceptions-in-_dl_lookup_symbol_x-since-glibc-2.27
-// RUN: %clangxx_asan -g %s -o %T/long-object-path
-// RUN: %run %T/a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../long-object-path
-
-int main(void) {
-    return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/malloc-in-qsort.cc (removed)
@@ -1,53 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %env_asan_opts=fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW
-
-// Test how well we unwind in presence of qsort in the stack
-// (i.e. if we can unwind through a function compiled w/o frame pointers).
-// https://code.google.com/p/address-sanitizer/issues/detail?id=137
-
-// Fast unwinder is only available on x86_64 and i386.
-// REQUIRES: x86-target-arch
-
-// REQUIRES: compiler-rt-optimized
-
-#include <stdlib.h>
-#include <stdio.h>
-
-int *GlobalPtr;
-
-extern "C" {
-int QsortCallback(const void *a, const void *b) {
-  char *x = (char*)a;
-  char *y = (char*)b;
-  printf("Calling QsortCallback\n");
-  GlobalPtr = new int[10];
-  return (int)*x - (int)*y;
-}
-
-__attribute__((noinline))
-void MyQsort(char *a, size_t size) {
-  printf("Calling qsort\n");
-  qsort(a, size, sizeof(char), QsortCallback);
-  printf("Done\n");  // Avoid tail call.
-}
-}  // extern "C"
-
-int main() {
-  char a[2] = {1, 2};
-  MyQsort(a, 2);
-  return GlobalPtr[10];
-}
-
-// Fast unwind may not unwind through qsort.
-// CHECK-FAST: ERROR: AddressSanitizer: heap-buffer-overflow
-// CHECK-FAST: is located 0 bytes to the right
-// CHECK-FAST: #0{{.*}}operator new
-// CHECK-FAST-NEXT: #1{{.*}}QsortCallback
-
-// CHECK-SLOW: ERROR: AddressSanitizer: heap-buffer-overflow
-// CHECK-SLOW: is located 0 bytes to the right
-// CHECK-SLOW: #0{{.*}}operator new
-// CHECK-SLOW-NEXT: #1{{.*}}QsortCallback
-// CHECK-SLOW: #{{.*}}MyQsort
-// CHECK-SLOW-NEXT: #{{.*}}main

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/malloc_delete_mismatch.cc (removed)
@@ -1,32 +0,0 @@
-// Check that we detect malloc/delete mismatch only if the approptiate flag
-// is set.
-
-// RUN: %clangxx_asan -g %s -o %t 2>&1
-
-// Find error and provide malloc context.
-// RUN: %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=ALLOC-STACK
-
-// No error here.
-// RUN: %env_asan_opts=alloc_dealloc_mismatch=0 %run %t
-
-// Also works if no malloc context is available.
-// RUN: %env_asan_opts=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=alloc_dealloc_mismatch=1:malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-#include <stdlib.h>
-
-static volatile char *x;
-
-int main() {
-  x = (char*)malloc(10);
-  x[0] = 0;
-  delete x;
-}
-// CHECK: ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete) on 0x
-// CHECK-NEXT: #0{{.*}}operator delete
-// CHECK: #{{.*}}main
-// CHECK: is located 0 bytes inside of 10-byte region
-// CHECK-NEXT: allocated by thread T0 here:
-// ALLOC-STACK-NEXT: #0{{.*}}malloc
-// ALLOC-STACK: #{{.*}}main
-// CHECK: HINT: {{.*}} you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/memmem_test.cc (removed)
@@ -1,24 +0,0 @@
-// RUN: %clangxx_asan  %s -o %t
-// RUN: not %run %t   2>&1 | FileCheck %s --check-prefix=A1
-// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=A2
-// RUN: %env_asan_opts=intercept_memmem=0 %run %t
-
-#include <string.h>
-int main(int argc, char **argv) {
-  char a1[] = {1, 2, 3, 4, 5, 6, 7, 8};
-  char a2[] = {3, 4, 5};
-  void *res;
-  if (argc == 1)
-    res = memmem(a1, sizeof(a1) + 1, a2, sizeof(a2));  // BOOM
-  else
-    res = memmem(a1, sizeof(a1), a2, sizeof(a2) + 1);  // BOOM
-  // A1: AddressSanitizer: stack-buffer-overflow
-  // A1: {{#0.*memmem}}
-  // A1-NEXT: {{#1.*main}}
-  // A1: 'a1'{{.*}} <== Memory access at offset
-  //
-  // A2: AddressSanitizer: stack-buffer-overflow
-  // A2: {{#0.*memmem}}
-  // A2: 'a2'{{.*}} <== Memory access at offset
-  return res == NULL;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/mincore.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clangxx_asan -std=c++11 -O0 %s -o %t && %run %t
-
-#include <assert.h>
-#include <unistd.h>
-#include <sys/mman.h>
-
-int main(void) {
-  unsigned char vec[20];
-  int res;
-  size_t PS = sysconf(_SC_PAGESIZE);
-  void *addr = mmap(nullptr, 20 * PS, PROT_READ | PROT_WRITE,
-                    MAP_NORESERVE | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
-
-  res = mincore(addr, 10 * PS, vec);
-  assert(res == 0);
-  for (int i = 0; i < 10; ++i)
-    assert((vec[i] & 1) == 0);
-
-  for (int i = 0; i < 5; ++i)
-    ((char *)addr)[i * PS] = 1;
-  res = mincore(addr, 10 * PS, vec);
-  assert(res == 0);
-  for (int i = 0; i < 10; ++i)
-    assert((vec[i] & 1) == (i < 5));
-
-  for (int i = 5; i < 10; ++i)
-    ((char *)addr)[i * PS] = 1;
-  res = mincore(addr, 10 * PS, vec);
-  assert(res == 0);
-  for (int i = 0; i < 10; ++i)
-    assert((vec[i] & 1) == 1);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch.cc (removed)
@@ -1,17 +0,0 @@
-// Check that we report new[] vs delete as alloc-dealloc-mismatch and not as
-// new-delete-type-mismatch when -fsized-deallocation is enabled.
-
-// RUN: %clangxx_asan -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -fsized-deallocation -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-
-static volatile char *x;
-
-int main() {
-  x = new char[10];
-  delete x;
-}
-
-// CHECK: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x
-// CHECK: is located 0 bytes inside of 10-byte region

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_global.cc (removed)
@@ -1,16 +0,0 @@
-// Check that we report delete on a memory that belongs to a global variable.
-
-// RUN: %clangxx_asan -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-
-static volatile char *x;
-char a[10];
-
-int main() {
-  x = &a[0];
-  delete x;
-}
-
-// CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed
-// CHECK: is located 0 bytes inside of global variable 'a' defined in

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_delete_mismatch_stack.cc (removed)
@@ -1,17 +0,0 @@
-// Check that we report delete on a memory that belongs to a stack variable.
-
-// RUN: %clangxx_asan -g %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-
-static volatile char *x;
-
-int main() {
-  char a[10];
-  x = &a[0];
-  delete x;
-}
-
-// CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed
-// CHECK: is located in stack of thread T0 at offset
-// CHECK: 'a'{{.*}} <== Memory access at offset {{16|32}} is inside this variable

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/nohugepage_test.cc (removed)
@@ -1,107 +0,0 @@
-// Regression test for
-// https://code.google.com/p/chromium/issues/detail?id=446692
-// where asan consumed too much RAM due to transparent hugetables.
-//
-// RUN: %clangxx_asan -g %s -o %t
-// RUN: %env_asan_opts=no_huge_pages_for_shadow=1 %run %t 2>&1 | FileCheck %s
-// RUN: %run %t 2>&1 | FileCheck %s
-//
-// Would be great to run the test with no_huge_pages_for_shadow=0, but
-// the result will depend on the OS version and settings...
-//
-// REQUIRES: x86_64-target-arch, shadow-scale-3
-//
-// WARNING: this test is very subtle and may nto work on some systems.
-// If this is the case we'll need to futher improve it or disable it.
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sanitizer/asan_interface.h>
-
-char FileContents[1 << 16];
-
-void FileToString(const char *path) {
-  FileContents[0] = 0;
-  int fd = open(path, 0);
-  if (fd < 0) return;
-  char *p = FileContents;
-  ssize_t size = sizeof(FileContents) - 1;
-  ssize_t res = 0;
-  do {
-    ssize_t got = read (fd, p, size);
-    if (got == 0)
-      break;
-    else if (got > 0)
-      {
-        p += got;
-        res += got;
-        size -= got;
-      }
-    else if (errno != EINTR)
-      break;
-  } while (size > 0 && res < sizeof(FileContents));
-  if (res >= 0)
-    FileContents[res] = 0;
-}
-
-long ReadShadowRss() {
-  const char *path = "/proc/self/smaps";
-  FileToString(path);
-  char *s = strstr(FileContents, "2008fff7000-10007fff8000");
-  if (!s) return 0;
-
-  s = strstr(s, "Rss:");
-  if (!s) return 0;
-  s = s + 4;
-  return atol(s);
-}
-
-const int kAllocSize = 1 << 28;  // 256Mb
-const int kTwoMb = 1 << 21;
-const int kAsanShadowGranularity = 8;
-
-char *x;
-
-__attribute__((no_sanitize_address)) void TouchNoAsan(size_t i) { x[i] = 0; }
-
-int main() {
-  long rss[5];
-  rss[0] = ReadShadowRss();
-  // use mmap directly to avoid asan touching the shadow.
-  x = (char *)mmap(0, kAllocSize, PROT_READ | PROT_WRITE,
-                   MAP_PRIVATE | MAP_ANON, 0, 0);
-  fprintf(stderr, "X: %p-%p\n", x, x + kAllocSize);
-  rss[1] = ReadShadowRss();
-
-  // Touch the allocated region, but not the shadow.
-  for (size_t i = 0; i < kAllocSize; i += kTwoMb * kAsanShadowGranularity)
-    TouchNoAsan(i);
-  rss[2] = ReadShadowRss();
-
-  // Touch the shadow just a bit, in 2Mb*Granularity steps.
-  for (size_t i = 0; i < kAllocSize; i += kTwoMb * kAsanShadowGranularity)
-    __asan_poison_memory_region(x + i, kAsanShadowGranularity);
-  rss[3] = ReadShadowRss();
-
-  // Touch all the shadow.
-  __asan_poison_memory_region(x, kAllocSize);
-  rss[4] = ReadShadowRss();
-
-  // Print the differences.
-  for (int i = 0; i < 4; i++) {
-    assert(rss[i] > 0);
-    assert(rss[i+1] >= rss[i]);
-    long diff = rss[i+1] / rss[i];
-    fprintf(stderr, "RSS CHANGE IS %d => %d: %s (%ld vs %ld)\n", i, i + 1,
-            diff < 10 ? "SMALL" : "LARGE", rss[i], rss[i + 1]);
-  }
-}
-// CHECK: RSS CHANGE IS 2 => 3: SMALL
-// CHECK: RSS CHANGE IS 3 => 4: LARGE

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc (removed)
@@ -1,65 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-//
-// We use fast_unwind_on_malloc=0 to have full unwinding even w/o frame
-// pointers. This setting is not on by default because it's too expensive.
-//
-// Different size: detect a bug if detect_odr_violation>=1
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %dynamiclib
-// RUN: %clangxx_asan %s %ld_flags_rpath_exe -o %t-ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t-ODR-EXE 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=0     %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0                        not %run %t-ODR-EXE 2>&1 | FileCheck %s
-//
-// Same size: report a bug only if detect_odr_violation>=2.
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %dynamiclib -DSZ=100
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1     %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0                        not %run %t-ODR-EXE 2>&1 | FileCheck %s
-// RUN: echo "odr_violation:foo::ZZZ" > %t.supp
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.supp  not %run %t-ODR-EXE 2>&1 | FileCheck %s
-// RUN: echo "odr_violation:foo::G" > %t.supp
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.supp      %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
-// RUN: rm -f %t.supp
-//
-// Use private aliases for global variables without indicator symbol.
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared -mllvm -asan-use-private-alias %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -mllvm -asan-use-private-alias %s %ld_flags_rpath_exe -o %t-ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
-
-// Use private aliases for global variables: use indicator symbol to detect ODR violation.
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared -mllvm -asan-use-private-alias -mllvm -asan-use-odr-indicator  %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -mllvm -asan-use-private-alias -mllvm -asan-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
-
-// Same as above but with clang switches.
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared -fsanitize-address-use-odr-indicator %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -fsanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
-
-// GNU driver doesn't handle .so files properly.
-// REQUIRES: Clang
-
-#ifndef SZ
-# define SZ 4
-#endif
-
-#if BUILD_SO
-namespace foo { char G[SZ]; }
-#else
-#include <stdio.h>
-namespace foo { char G[100]; }
-// CHECK: ERROR: AddressSanitizer: odr-violation
-// CHECK: size=100 'foo::G' {{.*}}odr-violation.cc:[[@LINE-2]]:22
-// CHECK: size={{4|100}} 'foo::G'
-int main(int argc, char **argv) {
-  printf("PASS: %p\n", &foo::G);
-}
-#endif
-
-// CHECK: These globals were registered at these points:
-// CHECK: ODR-EXE
-// CHECK: odr-violation.cc.dynamic
-// CHECK: SUMMARY: AddressSanitizer: odr-violation: global 'foo::G' at {{.*}}odr-violation.cc
-// DISABLED: PASS

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr-violation.cpp Mon Aug  5 09:48:12 2019
@@ -51,7 +51,7 @@ namespace foo { char G[SZ]; }
 #include <stdio.h>
 namespace foo { char G[100]; }
 // CHECK: ERROR: AddressSanitizer: odr-violation
-// CHECK: size=100 'foo::G' {{.*}}odr-violation.cc:[[@LINE-2]]:22
+// CHECK: size=100 'foo::G' {{.*}}odr-violation.cpp:[[@LINE-2]]:22
 // CHECK: size={{4|100}} 'foo::G'
 int main(int argc, char **argv) {
   printf("PASS: %p\n", &foo::G);
@@ -60,6 +60,6 @@ int main(int argc, char **argv) {
 
 // CHECK: These globals were registered at these points:
 // CHECK: ODR-EXE
-// CHECK: odr-violation.cc.dynamic
-// CHECK: SUMMARY: AddressSanitizer: odr-violation: global 'foo::G' at {{.*}}odr-violation.cc
+// CHECK: odr-violation.cpp.dynamic
+// CHECK: SUMMARY: AddressSanitizer: odr-violation: global 'foo::G' at {{.*}}odr-violation.cpp
 // DISABLED: PASS

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr-vtable.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clangxx_asan -fno-rtti -DBUILD_SO1 -fPIC -shared %s -o %dynamiclib1
-// RUN: %clangxx_asan -fno-rtti -DBUILD_SO2 -fPIC -shared %s -o %dynamiclib2
-// RUN: %clangxx_asan -fno-rtti %s %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t 2>&1 | FileCheck %s
-
-struct XYZ {
-  virtual void foo();
-};
-
-#if defined(BUILD_SO1)
-
-void XYZ::foo() {}
-
-#elif defined(BUILD_SO2)
-
-void XYZ::foo() {}
-
-#else
-
-int main() {}
-
-#endif
-
-// CHECK: AddressSanitizer: odr-violation
-// CHECK-NEXT: 'vtable for XYZ'
-// CHECK-NEXT: 'vtable for XYZ'

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/odr_indicators.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clangxx_asan -fPIC %s -o %t
-// RUN: %env_asan_opts=report_globals=2 %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,INDICATOR0
-
-// RUN: %clangxx_asan -fsanitize-address-use-odr-indicator -fPIC %s -o %t
-// RUN: %env_asan_opts=report_globals=2 %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,INDICATOR1
-
-#include <stdio.h>
-
-int test_global_1;
-// INDICATOR0-DAG: Added Global{{.*}} name=test_global_1{{.*}} odr_indicator={{0x0+$}}
-// INDICATOR1-DAG: Added Global{{.*}} name=test_global_1{{.*}} odr_indicator={{0x0*[^0]+.*$}}
-
-static int test_global_2;
-// CHECK-DAG: Added Global{{.*}} name=test_global_2{{.*}} odr_indicator={{0xf+$}}
-
-namespace {
-static int test_global_3;
-// CHECK-DAG: Added Global{{.*}} name={{.*}}::test_global_3{{.*}} odr_indicator={{0xf+$}}
-} // namespace
-
-int main() {
-  const char f[] = "%d %d %d\n";
-  // CHECK-DAG: Added Global{{.*}} name=__const.main.f{{.*}} odr_indicator={{0xf+$}}
-  printf(f, test_global_1, test_global_2, test_global_3);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/overflow-in-qsort.cc (removed)
@@ -1,49 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %env_asan_opts=fast_unwind_on_fatal=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FAST
-// RUN: %env_asan_opts=fast_unwind_on_fatal=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SLOW
-
-// Test how well we unwind in presence of qsort in the stack
-// (i.e. if we can unwind through a function compiled w/o frame pointers).
-// https://code.google.com/p/address-sanitizer/issues/detail?id=137
-
-// Fast unwinder is only available on x86_64 and i386.
-// REQUIRES: x86-target-arch
-
-#include <stdlib.h>
-#include <stdio.h>
-
-int global_array[10];
-volatile int one = 1;
-
-extern "C" {
-int QsortCallback(const void *a, const void *b) {
-  char *x = (char*)a;
-  char *y = (char*)b;
-  printf("Calling QsortCallback\n");
-  global_array[one * 10] = 0;  // BOOM
-  return (int)*x - (int)*y;
-}
-
-__attribute__((noinline))
-void MyQsort(char *a, size_t size) {
-  printf("Calling qsort\n");
-  qsort(a, size, sizeof(char), QsortCallback);
-  printf("Done\n");  // Avoid tail call.
-}
-}  // extern "C"
-
-int main() {
-  char a[2] = {1, 2};
-  MyQsort(a, 2);
-}
-
-// Fast unwind may not unwind through qsort.
-// CHECK-FAST: ERROR: AddressSanitizer: global-buffer-overflow
-// CHECK-FAST: #0{{.*}} in QsortCallback
-// CHECK-FAST: is located 0 bytes to the right of global variable 'global_array
-
-// CHECK-SLOW: ERROR: AddressSanitizer: global-buffer-overflow
-// CHECK-SLOW: #0{{.*}} in QsortCallback
-// CHECK-SLOW: #{{.*}} in MyQsort
-// CHECK-SLOW: #{{.*}} in main
-// CHECK-SLOW: is located 0 bytes to the right of global variable 'global_array

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/preinit_test.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clangxx -DFUNC=zzzz %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -DFUNC=main %s -o %t %ld_flags_rpath_exe
-// RUN: %run %t
-
-// GNU driver doesn't handle .so files properly.
-// REQUIRES: Clang
-
-// This test ensures that we call __asan_init early enough.
-// We build a shared library w/o asan instrumentation
-// and the binary with asan instrumentation.
-// Both files include the same header (emulated by -DFUNC here)
-// with C++ template magic which runs global initializer at library load time.
-// The function get() is instrumented with asan, but called
-// before the usual constructors are run.
-// So, we must make sure that __asan_init is executed even earlier.
-//
-// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56393
-
-struct A {
-  int foo() const { return 0; }
-};
-A get () { return A(); }
-template <class> struct O {
-  static A const e;
-};
-template <class T> A const O <T>::e = get();
-int FUNC() {
-  return O<int>::e.foo();
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/preinstalled_signal.cc (removed)
@@ -1,111 +0,0 @@
-// RUN: %clangxx -std=c++11 %s -o %t
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=1 not %run %t 2>&1 | FileCheck %s
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=2 not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx -std=c++11 -DTEST_INSTALL_SIG_HANDLER %s -o %t
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-HANDLER
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=1 not %run %t 2>&1 | FileCheck %s
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=2 not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx -std=c++11 -DTEST_INSTALL_SIG_ACTION %s -o %t
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ACTION
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=1 not %run %t 2>&1 | FileCheck %s
-// RUN: env LD_PRELOAD=%shared_libasan %env_asan_opts=handle_segv=2 not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: asan-dynamic-runtime
-
-// This way of setting LD_PRELOAD does not work with Android test runner.
-// REQUIRES: !android
-
-#include <assert.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-const char *handler = nullptr;
-void SigHandler(int signum) { handler = "TestSigHandler"; }
-void SigAction(int, siginfo_t *, void *) { handler = "TestSigAction"; }
-
-struct KernelSigaction {
-
-#if defined(__mips__)
-  unsigned long flags;
-  __sighandler_t handler;
-#else
-  __sighandler_t handler;
-  unsigned long flags;
-#endif
-  void (*restorer)();
-  char unused[1024];
-};
-
-#if defined(__x86_64__)
-extern "C" void restorer();
-asm("restorer:mov $15,%rax\nsyscall");
-#endif
-
-int InternalSigaction(int sig, KernelSigaction *act, KernelSigaction *oact) {
-  if (act) {
-#if defined(__x86_64__)
-    act->flags |= 0x04000000;
-    act->restorer = &restorer;
-#endif
-  }
-  return syscall(__NR_rt_sigaction, sig, act, oact, NSIG / 8);
-}
-
-struct KernelSigaction pre_asan = {};
-
-static void Init() {
-  int res = InternalSigaction(SIGSEGV, nullptr, &pre_asan);
-  assert(res >= 0);
-  assert(pre_asan.handler == SIG_DFL || pre_asan.handler == SIG_IGN);
-#if defined(TEST_INSTALL_SIG_HANDLER)
-  pre_asan = {};
-  pre_asan.handler = &SigHandler;
-  res = InternalSigaction(SIGSEGV, &pre_asan, nullptr);
-  assert(res >= 0);
-#elif defined(TEST_INSTALL_SIG_ACTION)
-  pre_asan = {};
-  pre_asan.flags = SA_SIGINFO | SA_NODEFER;
-  pre_asan.handler = (__sighandler_t)&SigAction;
-  res = InternalSigaction(SIGSEGV, &pre_asan, nullptr);
-  assert(res >= 0);
-#endif
-}
-
-__attribute__((section(".preinit_array"), used))
-void (*__local_test_preinit)(void) = Init;
-
-bool ExpectUserHandler() {
-#if defined(TEST_INSTALL_SIG_HANDLER) || defined(TEST_INSTALL_SIG_ACTION)
-  return !strcmp(getenv("ASAN_OPTIONS"), "handle_segv=0");
-#endif
-  return false;
-}
-
-int main(int argc, char *argv[]) {
-  KernelSigaction post_asan = {};
-  InternalSigaction(SIGSEGV, nullptr, &post_asan);
-
-  assert(post_asan.handler != SIG_DFL);
-  assert(post_asan.handler != SIG_IGN);
-  assert(ExpectUserHandler() ==
-         (post_asan.handler == pre_asan.handler));
-
-  raise(SIGSEGV);
-  printf("%s\n", handler);
-  return 1;
-}
-
-// CHECK-NOT: TestSig
-// CHECK: AddressSanitizer:DEADLYSIGNAL
-
-// CHECK-HANDLER-NOT: AddressSanitizer:DEADLYSIGNAL
-// CHECK-HANDLER: TestSigHandler
-
-// CHECK-ACTION-NOT: AddressSanitizer:DEADLYSIGNAL
-// CHECK-ACTION: TestSigAction

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/print_memory_profile_test.cc (removed)
@@ -1,39 +0,0 @@
-// Printing memory profiling only works in the configuration where we can
-// detect leaks.
-// REQUIRES: leak-detection
-//
-// RUN: %clangxx_asan %s -o %t
-// RUN: %run %t 100 10 2>&1 | FileCheck %s --check-prefix=CHECK-100-10
-// RUN: %run %t 100 1  2>&1 | FileCheck %s --check-prefix=CHECK-100-1
-// RUN: %run %t 50  10 2>&1 | FileCheck %s --check-prefix=CHECK-50-10
-#include <sanitizer/common_interface_defs.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-char *sink[1000];
-
-int main(int argc, char **argv) {
-  if (argc < 3)
-    return 1;
-
-  int idx = 0;
-  for (int i = 0; i < 17; i++)
-    sink[idx++] = new char[131000];
-  for (int i = 0; i < 28; i++)
-    sink[idx++] = new char[24000];
-
-  __sanitizer_print_memory_profile(atoi(argv[1]), atoi(argv[2]));
-}
-
-// CHECK-100-10: Live Heap Allocations: {{.*}}; showing top 100% (at most 10 unique contexts)
-// CHECK-100-10: 2227000 byte(s) ({{.*}}%) in 17 allocation(s)
-// CHECK-100-10: 672000 byte(s) ({{.*}}%) in 28 allocation(s)
-
-// CHECK-100-1: Live Heap Allocations: {{.*}}; showing top 100% (at most 1 unique contexts)
-// CHECK-100-1: 2227000 byte(s) ({{.*}}%) in 17 allocation(s)
-// CHECK-100-1-NOT: allocation
-
-// CHECK-50-10: Live Heap Allocations: {{.*}}; showing top 50% (at most 10 unique contexts)
-// CHECK-50-10: 2227000 byte(s) ({{.*}}%) in 17 allocation(s)
-// CHECK-50-10-NOT: allocation

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_from_constructor.cc (removed)
@@ -1,49 +0,0 @@
-// Test that ASan doesn't deadlock in __interceptor_pthread_create called
-// from dlopened shared library constructor. The deadlock happens only in shared
-// ASan runtime with recent Glibc (2.23 fits) when __interceptor_pthread_create
-// grabs global Glibc's GL(dl_load_lock) and waits for tls_get_addr_tail that
-// also tries to acquire it.
-//
-// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t-so.so
-// RUN: %clangxx_asan %s -o %t
-// RUN: %run %t 2>&1
-
-// dlopen() can not be intercepted on Android
-// UNSUPPORTED: android
-// REQUIRES: x86-target-arch
-
-#ifdef BUILD_SO
-
-#include <stdio.h>
-#include <pthread.h>
-#include <unistd.h>
-
-void *threadFn(void *) {
-  fprintf(stderr, "thread started\n");
-  while (true) {
-    usleep(100000);
-  }
-  return 0;
-}
-
-void __attribute__((constructor)) startPolling() {
-  fprintf(stderr, "initializing library\n");
-  pthread_t t;
-  pthread_create(&t, 0, &threadFn, 0);
-  fprintf(stderr, "done\n");
-}
-
-#else
-
-#include <dlfcn.h>
-#include <stdlib.h>
-#include <string>
-
-int main(int argc, char **argv) {
-  std::string path = std::string(argv[0]) + "-so.so";
-  void *handle = dlopen(path.c_str(), RTLD_LAZY);
-  if (!handle)
-    abort();
-  return 0;
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/pthread_create_version.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx_asan -std=c++11 -pthread %s -o %t && %run %t 2>&1
-// Regression test for the versioned pthread_create interceptor on linux/i386.
-// pthread_attr_init is not intercepted and binds to the new abi
-// pthread_create is intercepted; dlsym always returns the oldest version.
-// This results in a crash inside pthread_create in libc.
-
-#include <pthread.h>
-#include <stdlib.h>
-
-void *ThreadFunc(void *) { return nullptr; }
-
-int main() {
-  pthread_t t;
-  const size_t sz = 1024 * 1024;
-  void *p = malloc(sz);
-  pthread_attr_t attr;
-  pthread_attr_init(&attr);
-  pthread_attr_setstack(&attr, p, sz);
-  pthread_create(&t, &attr, ThreadFunc, nullptr);
-  pthread_join(t, nullptr);
-  free(p);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc (removed)
@@ -1,132 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-// XFAIL: mips
-//
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-// RUN: %clangxx_asan -DPOSITIVE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdio.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-#include <sys/user.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <sys/uio.h> // for iovec
-#include <elf.h> // for NT_PRSTATUS
-#ifdef __aarch64__
-# include <asm/ptrace.h>
-#endif
-
-#if defined(__i386__) || defined(__x86_64__)
-typedef user_regs_struct   regs_struct;
-typedef user_fpregs_struct fpregs_struct;
-#if defined(__i386__)
-#define REG_IP  eip
-#else
-#define REG_IP  rip
-#endif
-#define PRINT_REG_PC(__regs)    printf ("%lx\n", (unsigned long) (__regs.REG_IP))
-#define PRINT_REG_FP(__fpregs)  printf ("%lx\n", (unsigned long) (__fpregs.cwd))
-#define __PTRACE_FPREQUEST PTRACE_GETFPREGS
-
-#elif defined(__aarch64__)
-typedef struct user_pt_regs      regs_struct;
-typedef struct user_fpsimd_state fpregs_struct;
-#define PRINT_REG_PC(__regs)    printf ("%x\n", (unsigned) (__regs.pc))
-#define PRINT_REG_FP(__fpregs)  printf ("%x\n", (unsigned) (__fpregs.fpsr))
-#define ARCH_IOVEC_FOR_GETREGSET
-
-#elif defined(__powerpc64__)
-typedef struct pt_regs regs_struct;
-typedef elf_fpregset_t fpregs_struct;
-#define PRINT_REG_PC(__regs)    printf ("%lx\n", (unsigned long) (__regs.nip))
-#define PRINT_REG_FP(__fpregs)  printf ("%lx\n", (elf_greg_t)fpregs[32])
-#define ARCH_IOVEC_FOR_GETREGSET
-
-#elif defined(__mips__)
-typedef struct pt_regs regs_struct;
-typedef elf_fpregset_t fpregs_struct;
-#define PRINT_REG_PC(__regs)    printf ("%lx\n", (unsigned long) (__regs.cp0_epc))
-#define PRINT_REG_FP(__fpregs)  printf ("%lx\n", (elf_greg_t) (__fpregs[32]))
-#define __PTRACE_FPREQUEST PTRACE_GETFPREGS
-
-#elif defined(__arm__)
-# include <asm/ptrace.h>
-# include <sys/procfs.h>
-typedef struct pt_regs regs_struct;
-typedef char fpregs_struct[ARM_VFPREGS_SIZE];
-#define PRINT_REG_PC(__regs)    printf ("%x\n", (unsigned) (__regs.ARM_pc))
-#define PRINT_REG_FP(__fpregs)  printf ("%x\n", (unsigned) (__fpregs + 32 * 8))
-#define __PTRACE_FPREQUEST PTRACE_GETVFPREGS
-
-#elif defined(__s390__)
-typedef _user_regs_struct   regs_struct;
-typedef _user_fpregs_struct fpregs_struct;
-#define PRINT_REG_PC(__regs)    printf ("%lx\n", (unsigned long) (__regs.psw.addr))
-#define PRINT_REG_FP(__fpregs)  printf ("%lx\n", (unsigned long) (__fpregs.fpc))
-#define ARCH_IOVEC_FOR_GETREGSET
-#endif
-
-
-int main(void) {
-  pid_t pid;
-  pid = fork();
-  if (pid == 0) { // child
-    ptrace(PTRACE_TRACEME, 0, NULL, NULL);
-    execl("/bin/true", "true", NULL);
-  } else {
-    wait(NULL);
-    regs_struct regs;
-    regs_struct* volatile pregs = ®s;
-#ifdef ARCH_IOVEC_FOR_GETREGSET
-    struct iovec regset_io;
-#endif
-    int res;
-
-#ifdef POSITIVE
-    ++pregs;
-#endif
-
-#ifdef ARCH_IOVEC_FOR_GETREGSET
-# define __PTRACE_REQUEST  PTRACE_GETREGSET
-# define __PTRACE_ARGS     (void*)NT_PRSTATUS, (void*)&regset_io
-    regset_io.iov_base = pregs;
-    regset_io.iov_len = sizeof(regs_struct);
-#else
-# define __PTRACE_REQUEST  PTRACE_GETREGS
-# define __PTRACE_ARGS     NULL, pregs
-#endif
-    res = ptrace((enum __ptrace_request)__PTRACE_REQUEST, pid, __PTRACE_ARGS);
-    // CHECK: AddressSanitizer: stack-buffer-overflow
-    // CHECK: {{.*ptrace.cc:}}[[@LINE-2]]
-    assert(!res);
-    PRINT_REG_PC(regs);
-
-    fpregs_struct fpregs;
-#ifdef ARCH_IOVEC_FOR_GETREGSET
-# define __PTRACE_FPREQUEST  PTRACE_GETREGSET
-# define __PTRACE_FPARGS     (void*)NT_PRSTATUS, (void*)&regset_io
-    regset_io.iov_base = &fpregs;
-    regset_io.iov_len = sizeof(fpregs_struct);
-    res = ptrace((enum __ptrace_request)PTRACE_GETREGSET, pid, (void*)NT_FPREGSET,
-                 (void*)&regset_io);
-#else
-# define __PTRACE_FPARGS     NULL, &fpregs
-#endif
-    res = ptrace((enum __ptrace_request)__PTRACE_FPREQUEST, pid, __PTRACE_FPARGS);
-    assert(!res);
-    PRINT_REG_FP(fpregs);
-
-#ifdef __i386__
-    user_fpxregs_struct fpxregs;
-    res = ptrace(PTRACE_GETFPXREGS, pid, NULL, &fpxregs);
-    assert(!res);
-    printf("%lx\n", (unsigned long)fpxregs.mxcsr);
-#endif
-
-    ptrace(PTRACE_CONT, pid, NULL, NULL);
-    wait(NULL);
-  }
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/ptrace.cpp Mon Aug  5 09:48:12 2019
@@ -99,7 +99,7 @@ int main(void) {
 #endif
     res = ptrace((enum __ptrace_request)__PTRACE_REQUEST, pid, __PTRACE_ARGS);
     // CHECK: AddressSanitizer: stack-buffer-overflow
-    // CHECK: {{.*ptrace.cc:}}[[@LINE-2]]
+    // CHECK: {{.*ptrace.cpp:}}[[@LINE-2]]
     assert(!res);
     PRINT_REG_PC(regs);
 

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/quarantine_size_mb.cc (removed)
@@ -1,28 +0,0 @@
-// Test quarantine_size_mb (and the deprecated quarantine_size)
-// RUN: %clangxx_asan  %s -o %t
-// RUN: %env_asan_opts=quarantine_size=10485760:verbosity=1:hard_rss_limit_mb=50 %run %t  2>&1 | FileCheck %s  --check-prefix=Q10
-// RUN: %env_asan_opts=quarantine_size_mb=10:verbosity=1:hard_rss_limit_mb=50    %run %t  2>&1 | FileCheck %s  --check-prefix=Q10
-// RUN: %env_asan_opts=quarantine_size_mb=10:quarantine_size=20:verbosity=1  not %run %t  2>&1 | FileCheck %s  --check-prefix=BOTH
-// RUN: %env_asan_opts=quarantine_size_mb=1000:hard_rss_limit_mb=50 not  %run %t          2>&1 | FileCheck %s  --check-prefix=RSS_LIMIT
-// RUN: %env_asan_opts=hard_rss_limit_mb=20                         not  %run %t          2>&1 | FileCheck %s  --check-prefix=RSS_LIMIT
-
-// https://github.com/google/sanitizers/issues/981
-// UNSUPPORTED: android-26
-
-#include <string.h>
-char *g;
-
-static const int kNumAllocs = 1 << 11;
-static const int kAllocSize = 1 << 20;
-
-int main() {
-  for (int i = 0; i < kNumAllocs; i++) {
-    g = new char[kAllocSize];
-    memset(g, -1, kAllocSize);
-    delete [] (g);
-  }
-}
-
-// Q10: quarantine_size_mb=10M
-// BOTH: please use either 'quarantine_size' (deprecated) or quarantine_size_mb, but not both
-// RSS_LIMIT: AddressSanitizer: hard rss limit exhausted

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/recoverable-lsan.cc (removed)
@@ -1,22 +0,0 @@
-// Ensure that output is the same but exit code depends on halt_on_error value
-// RUN: %clangxx_asan %s -o %t
-// RUN: %env_asan_opts="halt_on_error=0" %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts="halt_on_error=1" not %run %t 2>&1 | FileCheck %s
-// RUN: not %run %t 2>&1 | FileCheck %s
-// REQUIRES: leak-detection
-// UNSUPPORTED: android 
-
-#include <stdlib.h>
-
-int f() {
-  volatile int *a = (int *)malloc(20);
-  a[0] = 1;
-  return a[0];
-}
-
-int main() {
-  f();
-  f();
-}
-
-// CHECK: LeakSanitizer: detected memory leaks

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc (removed)
@@ -1,81 +0,0 @@
-// Test that ASan detects buffer overflow on read from socket via recvfrom.
-//
-// RUN: %clangxx_asan %s -DRECVFROM -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-RECVFROM
-// RUN: %clangxx_asan %s -DSENDTO -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-SENDTO
-// RUN: %clangxx_asan %s -DSENDTO -o %t && %env_asan_opts=intercept_send=0 %run %t 2>&1
-//
-// UNSUPPORTED: android
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <netdb.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <pthread.h>
-
-#define CHECK_ERROR(p, m)                                                      \
-  do {                                                                         \
-    if (p) {                                                                   \
-      fprintf(stderr, "ERROR " m "\n");                                        \
-      exit(1);                                                                 \
-    }                                                                          \
-  } while (0)
-
-const int kBufSize = 10;
-int sockfd;
-
-static void *client_thread_udp(void *data) {
-#ifdef SENDTO
-  const char buf[kBufSize / 2] = {0, };
-#else
-  const char buf[kBufSize] = {0, };
-#endif
-  struct sockaddr_in serveraddr;
-  socklen_t addrlen = sizeof(serveraddr);
-
-  int succeeded = getsockname(sockfd, (struct sockaddr *)&serveraddr, &addrlen);
-  CHECK_ERROR(succeeded < 0, "in getsockname");
-
-  succeeded = sendto(sockfd, buf, kBufSize, 0, (struct sockaddr *)&serveraddr,
-                     sizeof(serveraddr));
-  // CHECK-SENDTO: {{READ of size 10 at 0x.* thread T1}}
-  // CHECK-SENDTO: {{    #1 0x.* in client_thread_udp.*recvfrom.cc:}}[[@LINE-3]]
-  CHECK_ERROR(succeeded < 0, "in sending message");
-  return NULL;
-}
-
-int main() {
-#ifdef RECVFROM
-  char buf[kBufSize / 2];
-#else
-  char buf[kBufSize];
-#endif
-  pthread_t client_thread;
-  struct sockaddr_in serveraddr;
-
-  sockfd = socket(AF_INET, SOCK_DGRAM, 0);
-  CHECK_ERROR(sockfd < 0, "opening socket");
-
-  memset(&serveraddr, 0, sizeof(serveraddr));
-  serveraddr.sin_family = AF_INET;
-  serveraddr.sin_addr.s_addr = htonl(INADDR_ANY);
-  serveraddr.sin_port = 0;
-
-  int bound = bind(sockfd, (struct sockaddr *)&serveraddr, sizeof(serveraddr));
-  CHECK_ERROR(bound < 0, "on binding");
-
-  int succeeded =
-      pthread_create(&client_thread, NULL, client_thread_udp, &serveraddr);
-  CHECK_ERROR(succeeded, "creating thread");
-
-  recvfrom(sockfd, buf, kBufSize, 0, NULL, NULL); // BOOM
-  // CHECK-RECVFROM: {{WRITE of size 10 at 0x.* thread T0}}
-  // CHECK-RECVFROM: {{    #1 0x.* in main.*recvfrom.cc:}}[[@LINE-2]]
-  // CHECK-RECVFROM: {{Address 0x.* is located in stack of thread T0 at offset}}
-  // CHECK-RECVFROM-NEXT: in{{.*}}main{{.*}}recvfrom.cc
-  succeeded = pthread_join(client_thread, NULL);
-  CHECK_ERROR(succeeded, "joining thread");
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/recvfrom.cpp Mon Aug  5 09:48:12 2019
@@ -41,7 +41,7 @@ static void *client_thread_udp(void *dat
   succeeded = sendto(sockfd, buf, kBufSize, 0, (struct sockaddr *)&serveraddr,
                      sizeof(serveraddr));
   // CHECK-SENDTO: {{READ of size 10 at 0x.* thread T1}}
-  // CHECK-SENDTO: {{    #1 0x.* in client_thread_udp.*recvfrom.cc:}}[[@LINE-3]]
+  // CHECK-SENDTO: {{    #1 0x.* in client_thread_udp.*recvfrom.cpp:}}[[@LINE-3]]
   CHECK_ERROR(succeeded < 0, "in sending message");
   return NULL;
 }
@@ -72,9 +72,9 @@ int main() {
 
   recvfrom(sockfd, buf, kBufSize, 0, NULL, NULL); // BOOM
   // CHECK-RECVFROM: {{WRITE of size 10 at 0x.* thread T0}}
-  // CHECK-RECVFROM: {{    #1 0x.* in main.*recvfrom.cc:}}[[@LINE-2]]
+  // CHECK-RECVFROM: {{    #1 0x.* in main.*recvfrom.cpp:}}[[@LINE-2]]
   // CHECK-RECVFROM: {{Address 0x.* is located in stack of thread T0 at offset}}
-  // CHECK-RECVFROM-NEXT: in{{.*}}main{{.*}}recvfrom.cc
+  // CHECK-RECVFROM-NEXT: in{{.*}}main{{.*}}recvfrom.cpp
   succeeded = pthread_join(client_thread, NULL);
   CHECK_ERROR(succeeded, "joining thread");
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/release_to_os_test.cc (removed)
@@ -1,54 +0,0 @@
-// Tests ASAN_OPTIONS=allocator_release_to_os=1
-
-// RUN: %clangxx_asan -std=c++11 %s -o %t
-// RUN: %env_asan_opts=allocator_release_to_os_interval_ms=0 %run %t 2>&1 | FileCheck %s --check-prefix=RELEASE
-// RUN: %env_asan_opts=allocator_release_to_os_interval_ms=-1 %run %t 2>&1 | FileCheck %s --check-prefix=NO_RELEASE
-// RUN: %env_asan_opts=allocator_release_to_os_interval_ms=-1 %run %t force 2>&1 | FileCheck %s --check-prefix=FORCE_RELEASE
-
-// REQUIRES: x86_64-target-arch
-
-#include <algorithm>
-#include <assert.h>
-#include <random>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sanitizer/allocator_interface.h>
-#include <sanitizer/asan_interface.h>
-
-void MallocReleaseStress() {
-  const size_t kNumChunks = 10000;
-  const size_t kAllocSize = 100;
-  const size_t kNumIter = 100;
-  uintptr_t *chunks[kNumChunks] = {0};
-  std::mt19937 r;
-
-  for (size_t iter = 0; iter < kNumIter; iter++) {
-    std::shuffle(chunks, chunks + kNumChunks, r);
-    size_t to_replace = rand() % kNumChunks;
-    for (size_t i = 0; i < kNumChunks; i++) {
-      if (chunks[i])
-        assert(chunks[i][0] == (uintptr_t)chunks[i]);
-      if (i < to_replace) {
-        delete [] chunks[i];
-        chunks[i] = new uintptr_t[kAllocSize];
-        chunks[i][0] = (uintptr_t)chunks[i];
-      }
-    }
-  }
-  for (auto p : chunks)
-    delete[] p;
-}
-
-int main(int argc, char **argv) {
-  MallocReleaseStress();
-  if (argc > 1 && !strcmp("force", argv[1]))
-    __sanitizer_purge_allocator();
-  __asan_print_accumulated_stats();
-}
-
-// RELEASE: mapped:{{.*}}releases: {{[1-9]}}
-// NO_RELEASE: mapped:{{.*}}releases: 0
-// FORCE_RELEASE: mapped:{{.*}}releases: {{[1-9]}}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/rlimit_mmap_test.cc (removed)
@@ -1,16 +0,0 @@
-// Check that we properly report mmap failure.
-// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
-#include <stdlib.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-static volatile void *x;
-
-int main(int argc, char **argv) {
-  struct rlimit mmap_resource_limit = { 0, 0 };
-  assert(0 == setrlimit(RLIMIT_AS, &mmap_resource_limit));
-  x = malloc(10000000);
-// CHECK: ERROR: Failed to mmap
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/sanbox_read_proc_self_maps_test.cc (removed)
@@ -1,28 +0,0 @@
-// REQUIRES: x86_64-target-arch
-// RUN: %clangxx_asan  %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-#include <sanitizer/common_interface_defs.h>
-#include <sched.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  __sanitizer_sandbox_arguments args = {0};
-  // should cache /proc/self/maps
-  __sanitizer_sandbox_on_notify(&args);
-
-  if (unshare(CLONE_NEWUSER)) {
-    printf("unshare failed\n");
-    return 1;
-  }
-
-  // remove access to /proc/self/maps
-  if (chroot("/tmp")) {
-    printf("chroot failed\n");
-    return 2;
-  }
-
-  *(volatile int*)0x42 = 0;
-// CHECK-NOT: CHECK failed
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/shmctl.cc (removed)
@@ -1,27 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-//
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1
-// Regression test for
-// https://code.google.com/p/address-sanitizer/issues/detail?id=250
-#include <stdio.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <assert.h>
-
-int main() {
-  int id = shmget(IPC_PRIVATE, 4096, 0644 | IPC_CREAT);
-  assert(id > -1);
-  struct shmid_ds ds;
-  int res = shmctl(id, IPC_STAT, &ds);
-  assert(res > -1);
-  printf("shm_segsz: %zd\n", ds.shm_segsz);
-  assert(ds.shm_segsz == 4096);
-  assert(-1 != shmctl(id, IPC_RMID, 0));
-
-  struct shm_info shmInfo;
-  res = shmctl(0, SHM_INFO, (struct shmid_ds *)&shmInfo);
-  assert(res > -1);
-  
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/signal_during_stop_the_world.cc (removed)
@@ -1,60 +0,0 @@
-// Test StopTheWorld behavior during signal storm.
-// Historically StopTheWorld crashed because did not handle EINTR properly.
-// The test is somewhat convoluted, but that's what caused crashes previously.
-
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/prctl.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <pthread.h>
-#include <sanitizer/lsan_interface.h>
-
-static void handler(int signo);
-static void *thr(void *arg);
-
-int main() {
-  struct sigaction act = {};
-  act.sa_handler = handler;
-  sigaction(SIGPROF, &act, 0);
-
-  pid_t pid = fork();
-  if (pid < 0) {
-    fprintf(stderr, "failed to fork\n");
-    exit(1);
-  }
-  if (pid == 0) {
-    // Child constantly sends signals to parent to cause spurious return from
-    // waitpid in StopTheWorld.
-    prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0);
-    pid_t parent = getppid();
-    for (;;) {
-      // There is no strong reason for these two particular signals,
-      // but at least one of them ought to unblock waitpid.
-      kill(parent, SIGCHLD);
-      kill(parent, SIGPROF);
-    }
-  }
-  usleep(10000);  // Let the child start.
-  __lsan_do_leak_check();
-  // Kill and join the child.
-  kill(pid, SIGTERM);
-  waitpid(pid, 0, 0);
-  sleep(1);  // If the tracer thread still runs, give it time to crash.
-  fprintf(stderr, "DONE\n");
-// CHECK: DONE
-}
-
-static void handler(int signo) {
-}
-
-static void *thr(void *arg) {
-  for (;;)
-    sleep(1);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/sized_delete_test.cc (removed)
@@ -1,89 +0,0 @@
-// RUN: %clangxx_asan -fsized-deallocation -O0 %s -o %t
-// RUN:                                                                  not %run %t scalar 2>&1 | FileCheck %s -check-prefix=SCALAR
-// RUN: %env_asan_opts=new_delete_type_mismatch=1 not %run %t scalar 2>&1 | FileCheck %s -check-prefix=SCALAR
-// RUN:                                                                  not %run %t array  2>&1 | FileCheck %s -check-prefix=ARRAY
-// RUN: %env_asan_opts=new_delete_type_mismatch=1 not %run %t array  2>&1 | FileCheck %s -check-prefix=ARRAY
-// RUN: %env_asan_opts=new_delete_type_mismatch=0     %run %t scalar
-// RUN: %env_asan_opts=new_delete_type_mismatch=0     %run %t array
-
-#include <new>
-#include <stdio.h>
-#include <string>
-
-inline void break_optimization(void *arg) {
-  __asm__ __volatile__("" : : "r" (arg) : "memory");
-}
-
-struct S12 {
-  int a, b, c;
-};
-
-struct S20 {
-  int a, b, c, d, e;
-};
-
-struct D1 {
-  int a, b, c;
-  ~D1() { fprintf(stderr, "D1::~D1\n"); }
-};
-
-struct D2 {
-  int a, b, c, d, e;
-  ~D2() { fprintf(stderr, "D2::~D2\n"); }
-};
-
-void Del12(S12 *x) {
-  break_optimization(x);
-  delete x;
-}
-void Del12NoThrow(S12 *x) {
-  break_optimization(x);
-  operator delete(x, std::nothrow);
-}
-void Del12Ar(S12 *x) {
-  break_optimization(x);
-  delete [] x;
-}
-void Del12ArNoThrow(S12 *x) {
-  break_optimization(x);
-  operator delete[](x, std::nothrow);
-}
-
-int main(int argc, char **argv) {
-  if (argc != 2) return 1;
-  std::string flag = argv[1];
-  // These are correct.
-  Del12(new S12);
-  Del12NoThrow(new S12);
-  Del12Ar(new S12[100]);
-  Del12ArNoThrow(new S12[100]);
-
-  // Here we pass wrong type of pointer to delete,
-  // but [] and nothrow variants of delete are not sized.
-  Del12Ar(reinterpret_cast<S12*>(new S20[100]));
-  Del12NoThrow(reinterpret_cast<S12*>(new S20));
-  Del12ArNoThrow(reinterpret_cast<S12*>(new S20[100]));
-  fprintf(stderr, "OK SO FAR\n");
-  // SCALAR: OK SO FAR
-  // ARRAY: OK SO FAR
-  if (flag == "scalar") {
-    // Here asan should bark as we are passing a wrong type of pointer
-    // to sized delete.
-    Del12(reinterpret_cast<S12*>(new S20));
-    // SCALAR: AddressSanitizer: new-delete-type-mismatch
-    // SCALAR:  object passed to delete has wrong type:
-    // SCALAR:  size of the allocated type:   20 bytes;
-    // SCALAR:  size of the deallocated type: 12 bytes.
-    // SCALAR: is located 0 bytes inside of 20-byte region
-    // SCALAR: SUMMARY: AddressSanitizer: new-delete-type-mismatch
-  } else if (flag == "array") {
-    D1 *d1 = reinterpret_cast<D1*>(new D2[10]);
-    break_optimization(d1);
-    delete [] d1;
-    // ARRAY-NOT: D2::~D2
-    // ARRAY: D1::~D1
-    // ARRAY: AddressSanitizer: new-delete-type-mismatch
-    // ARRAY:  size of the allocated type:   20{{4|8}} bytes;
-    // ARRAY:  size of the deallocated type: 12{{4|8}} bytes.
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-recovery-mode.cc (removed)
@@ -1,36 +0,0 @@
-// Test that ASan doesn't hang on stack overflow in recovery mode.
-//
-// RUN: %clang_asan -O0 -fsanitize-recover=address %s -o %t
-// RUN: %env_asan_opts=halt_on_error=false not %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/resource.h>
-
-static volatile int *recurse(volatile int n, volatile int *p) {
-  // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* bp 0x.* sp 0x.* T.*\)}}
-  if (n >= 0) *recurse(n + 1, p) += n;
-  return p;
-}
-
-
-void LimitStackAndReexec(int argc, char **argv) {
-  struct rlimit rlim;
-  int res = getrlimit(RLIMIT_STACK, &rlim);
-  assert(res == 0);
-  if (rlim.rlim_cur == RLIM_INFINITY) {
-    rlim.rlim_cur = 256 * 1024;
-    res = setrlimit(RLIMIT_STACK, &rlim);
-    assert(res == 0);
-
-    execv(argv[0], argv);
-    assert(0 && "unreachable");
-  }
-}
-
-int main(int argc, char **argv) {
-  LimitStackAndReexec(argc, argv);
-  volatile int res;
-  return *recurse(argc + 1, &res);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/stack-overflow-sigbus.cc (removed)
@@ -1,64 +0,0 @@
-// Test ASan detection of stack-overflow condition when Linux sends SIGBUS.
-
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/resource.h>
-
-const int BS = 1024;
-volatile char x;
-volatile int y = 1;
-
-void recursive_func(char *p) {
-  char buf[BS];
-  buf[rand() % BS] = 1;
-  buf[rand() % BS] = 2;
-  x = buf[rand() % BS];
-  if (y)
-    recursive_func(buf);
-  x = 1; // prevent tail call optimization
-  // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* bp 0x.* sp 0x.* T.*\)}}
-}
-
-void LimitStackAndReexec(int argc, char **argv) {
-  struct rlimit rlim;
-  int res = getrlimit(RLIMIT_STACK, &rlim);
-  assert(res == 0);
-  if (rlim.rlim_cur == RLIM_INFINITY) {
-    rlim.rlim_cur = 256 * 1024;
-    res = setrlimit(RLIMIT_STACK, &rlim);
-    assert(res == 0);
-
-    execv(argv[0], argv);
-    assert(0 && "unreachable");
-  }
-}
-
-int main(int argc, char **argv) {
-  LimitStackAndReexec(argc, argv);
-
-  // Map some memory just before the start of the current stack vma.
-  // When the stack grows down and crashes into it, Linux can send
-  // SIGBUS instead of SIGSEGV. See:
-  // http://lkml.iu.edu/hypermail/linux/kernel/1008.1/02299.html
-  const long pagesize = sysconf(_SC_PAGESIZE);
-  FILE *f = fopen("/proc/self/maps", "r");
-  char a[1000];
-  void *p = 0;
-  while (fgets(a, sizeof a, f)) {
-    if (strstr(a, "[stack]")) {
-      unsigned long addr;
-      if (sscanf(a, "%lx", &addr) == 1)
-        p = mmap((void *)(addr - 4 * pagesize), pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-    }
-  }
-  assert(p);
-
-  recursive_func(0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/stack-trace-dlclose.cc (removed)
@@ -1,46 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-//
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-// RUN: %clangxx_asan -DSHARED %s -shared -o %t-dir/stack_trace_dlclose.so -fPIC
-// RUN: %clangxx_asan -DSO_DIR=\"%t-dir\" %s %libdl -o %t
-// RUN: %env_asan_opts=exitcode=0 %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <sanitizer/common_interface_defs.h>
-
-#ifdef SHARED
-extern "C" {
-void *foo() {
-  return malloc(1);
-}
-}
-#else
-void *handle;
-
-int main(int argc, char **argv) {
-  void *handle = dlopen(SO_DIR "/stack_trace_dlclose.so", RTLD_LAZY);
-  assert(handle);
-  void *(*foo)() = (void *(*)())dlsym(handle, "foo");
-  assert(foo);
-  void *p = foo();
-  assert(p);
-  dlclose(handle);
-
-  free(p);
-  free(p);  // double-free
-
-  return 0;
-}
-#endif
-
-// CHECK: {{    #0 0x.* in (__interceptor_)?malloc}}
-// CHECK: {{    #1 0x.* \(<unknown module>\)}}
-// CHECK: {{    #2 0x.* in main}}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/static_tls.cc (removed)
@@ -1,31 +0,0 @@
-// REQUIRES: asan-64-bits
-// Regression test: __tls_get_addr interceptor must recognize static TLS.
-//
-// RUN: %clangxx_asan -DSHARED %s -shared -o %t-so.so -fPIC
-// RUN: %clangxx_asan %s -ldl -pthread -o %t %t-so.so
-// RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s
-
-// CHECK: before
-// CHECK: __tls_get_addr: static tls
-// CHECK: after
-
-// XFAIL: aarch64
-// binutils 2.26 has a change that causes this test to fail on powerpc64.
-// UNSUPPORTED: powerpc64 
-
-#ifndef SHARED
-#include <stdio.h>
-
-unsigned *f();
-int main(int argc, char *argv[]) {
-  fprintf(stderr, "before\n");
-  f();
-  fprintf(stderr, "after\n");
-  return 0;
-}
-#else  // SHARED
-static __thread unsigned ThreadLocal;
-unsigned *f() {
-  return &ThreadLocal;
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_annotation.cc (removed)
@@ -1,207 +0,0 @@
-// Check that ASan plays well with annotated makecontext/swapcontext.
-
-// RUN: %clangxx_asan -std=c++11 -lpthread -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -std=c++11 -lpthread -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -std=c++11 -lpthread -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -std=c++11 -lpthread -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: seq 60 | xargs -i -- grep LOOPCHECK %s > %t.checks
-// RUN: %clangxx_asan -std=c++11 -lpthread -O0 %s -o %t && %run %t 2>&1 | FileCheck %t.checks --check-prefix LOOPCHECK
-// RUN: %clangxx_asan -std=c++11 -lpthread -O1 %s -o %t && %run %t 2>&1 | FileCheck %t.checks --check-prefix LOOPCHECK
-// RUN: %clangxx_asan -std=c++11 -lpthread -O2 %s -o %t && %run %t 2>&1 | FileCheck %t.checks --check-prefix LOOPCHECK
-// RUN: %clangxx_asan -std=c++11 -lpthread -O3 %s -o %t && %run %t 2>&1 | FileCheck %t.checks --check-prefix LOOPCHECK
-
-//
-// This test is too subtle to try on non-x86 arch for now.
-// Android does not support swapcontext.
-// REQUIRES: x86-target-arch && !android
-
-#include <pthread.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <ucontext.h>
-#include <unistd.h>
-
-#include <sanitizer/common_interface_defs.h>
-
-ucontext_t orig_context;
-ucontext_t child_context;
-ucontext_t next_child_context;
-
-char *next_child_stack;
-
-const int kStackSize = 1 << 20;
-
-const void *main_thread_stack;
-size_t main_thread_stacksize;
-
-const void *from_stack;
-size_t from_stacksize;
-
-__attribute__((noinline, noreturn)) void LongJump(jmp_buf env) {
-  longjmp(env, 1);
-  _exit(1);
-}
-
-// Simulate __asan_handle_no_return().
-__attribute__((noinline)) void CallNoReturn() {
-  jmp_buf env;
-  if (setjmp(env) != 0) return;
-
-  LongJump(env);
-  _exit(1);
-}
-
-void NextChild() {
-  CallNoReturn();
-  __sanitizer_finish_switch_fiber(nullptr, &from_stack, &from_stacksize);
-
-  printf("NextChild from: %p %zu\n", from_stack, from_stacksize);
-
-  char x[32] = {0};  // Stack gets poisoned.
-  printf("NextChild: %p\n", x);
-
-  CallNoReturn();
-
-  __sanitizer_start_switch_fiber(nullptr,
-                                 main_thread_stack,
-                                 main_thread_stacksize);
-  CallNoReturn();
-  if (swapcontext(&next_child_context, &orig_context) < 0) {
-    perror("swapcontext");
-    _exit(1);
-  }
-}
-
-void Child(int mode) {
-  CallNoReturn();
-  __sanitizer_finish_switch_fiber(nullptr,
-                                  &main_thread_stack,
-                                  &main_thread_stacksize);
-  char x[32] = {0};  // Stack gets poisoned.
-  printf("Child: %p\n", x);
-  CallNoReturn();
-  // (a) Do nothing, just return to parent function.
-  // (b) Jump into the original function. Stack remains poisoned unless we do
-  //     something.
-  // (c) Jump to another function which will then jump back to the main function
-  if (mode == 0) {
-    __sanitizer_start_switch_fiber(nullptr,
-                                   main_thread_stack,
-                                   main_thread_stacksize);
-    CallNoReturn();
-  } else if (mode == 1) {
-    __sanitizer_start_switch_fiber(nullptr,
-                                   main_thread_stack,
-                                   main_thread_stacksize);
-    CallNoReturn();
-    if (swapcontext(&child_context, &orig_context) < 0) {
-      perror("swapcontext");
-      _exit(1);
-    }
-  } else if (mode == 2) {
-    printf("NextChild stack: %p\n", next_child_stack);
-
-    getcontext(&next_child_context);
-    next_child_context.uc_stack.ss_sp = next_child_stack;
-    next_child_context.uc_stack.ss_size = kStackSize / 2;
-    makecontext(&next_child_context, (void (*)())NextChild, 0);
-    __sanitizer_start_switch_fiber(nullptr,
-                                   next_child_context.uc_stack.ss_sp,
-                                   next_child_context.uc_stack.ss_size);
-    CallNoReturn();
-    if (swapcontext(&child_context, &next_child_context) < 0) {
-      perror("swapcontext");
-      _exit(1);
-    }
-  }
-}
-
-int Run(int arg, int mode, char *child_stack) {
-  printf("Child stack: %p\n", child_stack);
-  // Setup child context.
-  getcontext(&child_context);
-  child_context.uc_stack.ss_sp = child_stack;
-  child_context.uc_stack.ss_size = kStackSize / 2;
-  if (mode == 0) {
-    child_context.uc_link = &orig_context;
-  }
-  makecontext(&child_context, (void (*)())Child, 1, mode);
-  CallNoReturn();
-  void* fake_stack_save;
-  __sanitizer_start_switch_fiber(&fake_stack_save,
-                                 child_context.uc_stack.ss_sp,
-                                 child_context.uc_stack.ss_size);
-  CallNoReturn();
-  if (swapcontext(&orig_context, &child_context) < 0) {
-    perror("swapcontext");
-    _exit(1);
-  }
-  CallNoReturn();
-  __sanitizer_finish_switch_fiber(fake_stack_save,
-                                  &from_stack,
-                                  &from_stacksize);
-  CallNoReturn();
-  printf("Main context from: %p %zu\n", from_stack, from_stacksize);
-
-  // Touch childs's stack to make sure it's unpoisoned.
-  for (int i = 0; i < kStackSize; i++) {
-    child_stack[i] = i;
-  }
-  return child_stack[arg];
-}
-
-void handler(int sig) { CallNoReturn(); }
-
-int main(int argc, char **argv) {
-  // set up a signal that will spam and trigger __asan_handle_no_return at
-  // tricky moments
-  struct sigaction act = {};
-  act.sa_handler = &handler;
-  if (sigaction(SIGPROF, &act, 0)) {
-    perror("sigaction");
-    _exit(1);
-  }
-
-  itimerval t;
-  t.it_interval.tv_sec = 0;
-  t.it_interval.tv_usec = 10;
-  t.it_value = t.it_interval;
-  if (setitimer(ITIMER_PROF, &t, 0)) {
-    perror("setitimer");
-    _exit(1);
-  }
-
-  char *heap = new char[kStackSize + 1];
-  next_child_stack = new char[kStackSize + 1];
-  char stack[kStackSize + 1];
-  // CHECK: WARNING: ASan doesn't fully support makecontext/swapcontext
-  int ret = 0;
-  // CHECK-NOT: ASan is ignoring requested __asan_handle_no_return
-  for (unsigned int i = 0; i < 30; ++i) {
-    ret += Run(argc - 1, 0, stack);
-    // LOOPCHECK: Child stack: [[CHILD_STACK:0x[0-9a-f]*]]
-    // LOOPCHECK: Main context from: [[CHILD_STACK]] 524288
-    ret += Run(argc - 1, 1, stack);
-    // LOOPCHECK: Child stack: [[CHILD_STACK:0x[0-9a-f]*]]
-    // LOOPCHECK: Main context from: [[CHILD_STACK]] 524288
-    ret += Run(argc - 1, 2, stack);
-    // LOOPCHECK: Child stack: [[CHILD_STACK:0x[0-9a-f]*]]
-    // LOOPCHECK: NextChild stack: [[NEXT_CHILD_STACK:0x[0-9a-f]*]]
-    // LOOPCHECK: NextChild from: [[CHILD_STACK]] 524288
-    // LOOPCHECK: Main context from: [[NEXT_CHILD_STACK]] 524288
-    ret += Run(argc - 1, 0, heap);
-    ret += Run(argc - 1, 1, heap);
-    ret += Run(argc - 1, 2, heap);
-    printf("Iteration %d passed\n", i);
-  }
-
-  // CHECK: Test passed
-  printf("Test passed\n");
-
-  delete[] heap;
-  delete[] next_child_stack;
-
-  return ret;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/swapcontext_test.cc (removed)
@@ -1,91 +0,0 @@
-// Check that ASan plays well with easy cases of makecontext/swapcontext.
-
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
-//
-// This test is too sublte to try on non-x86 arch for now.
-// Android does not support swapcontext.
-// REQUIRES: x86-target-arch && !android
-
-#include <stdio.h>
-#include <ucontext.h>
-#include <unistd.h>
-
-ucontext_t orig_context;
-ucontext_t child_context;
-
-const int kStackSize = 1 << 20;
-
-__attribute__((noinline))
-void Throw() {
-  throw 1;
-}
-
-__attribute__((noinline))
-void ThrowAndCatch() {
-  try {
-    Throw();
-  } catch(int a) {
-    printf("ThrowAndCatch: %d\n", a);
-  }
-}
-
-void Child(int mode) {
-  char x[32] = {0};  // Stack gets poisoned.
-  printf("Child: %p\n", x);
-  ThrowAndCatch();  // Simulate __asan_handle_no_return().
-  // (a) Do nothing, just return to parent function.
-  // (b) Jump into the original function. Stack remains poisoned unless we do
-  //     something.
-  if (mode == 1) {
-    if (swapcontext(&child_context, &orig_context) < 0) {
-      perror("swapcontext");
-      _exit(0);
-    }
-  }
-}
-
-int Run(int arg, int mode, char *child_stack) {
-  printf("Child stack: %p\n", child_stack);
-  // Setup child context.
-  getcontext(&child_context);
-  child_context.uc_stack.ss_sp = child_stack;
-  child_context.uc_stack.ss_size = kStackSize / 2;
-  if (mode == 0) {
-    child_context.uc_link = &orig_context;
-  }
-  makecontext(&child_context, (void (*)())Child, 1, mode);
-  if (swapcontext(&orig_context, &child_context) < 0) {
-    perror("swapcontext");
-    return 0;
-  }
-  // Touch childs's stack to make sure it's unpoisoned.
-  for (int i = 0; i < kStackSize; i++) {
-    child_stack[i] = i;
-  }
-  return child_stack[arg];
-}
-
-int main(int argc, char **argv) {
-  char stack[kStackSize + 1];
-  // CHECK: WARNING: ASan doesn't fully support makecontext/swapcontext
-  int ret = 0;
-  ret += Run(argc - 1, 0, stack);
-  printf("Test1 passed\n");
-  // CHECK: Test1 passed
-  ret += Run(argc - 1, 1, stack);
-  printf("Test2 passed\n");
-  // CHECK: Test2 passed
-  char *heap = new char[kStackSize + 1];
-  ret += Run(argc - 1, 0, heap);
-  printf("Test3 passed\n");
-  // CHECK: Test3 passed
-  ret += Run(argc - 1, 1, heap);
-  printf("Test4 passed\n");
-  // CHECK: Test4 passed
-
-  delete [] heap;
-  return ret;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/syscalls.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <errno.h>
-#include <glob.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <sanitizer/linux_syscall_hooks.h>
-
-/* Test the presence of __sanitizer_syscall_ in the tool runtime, and general
-   sanity of their behaviour. */
-
-int main(int argc, char *argv[]) {
-  char buf[1000];
-  __sanitizer_syscall_pre_recvmsg(0, buf - 1, 0);
-  // CHECK: AddressSanitizer: stack-buffer-{{.*}}erflow
-  // CHECK: READ of size {{.*}} at {{.*}} thread T0
-  // CHECK: #0 {{.*}} in __sanitizer_syscall{{.*}}recvmsg
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_pthread_join.cc (removed)
@@ -1,56 +0,0 @@
-// Test how creating and joining a lot of threads making only a few allocations
-// each affect total quarantine (and overall heap) size.
-
-// RUN: %clangxx_asan  %s -o %t
-// RUN: %env_asan_opts=thread_local_quarantine_size_kb=64:quarantine_size_mb=1:allocator_release_to_os_interval_ms=-1 %run %t 2>&1 | \
-// RUN:   FileCheck %s --allow-empty --check-prefix=CHECK-SMALL-LOCAL-CACHE-SMALL-OVERHEAD
-
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sanitizer/allocator_interface.h>
-
-// Thread local quarantine is merged to the global one when thread exits and
-// this scenario (a few allocations per thread) used to generate a huge overhead
-// of practically empty quarantine batches (one per thread).
-static const size_t kHeapSizeIncrementLimit = 2 << 20;
-static const int kNumThreads = 2048;
-// The allocation size is so small because all we want to test is that
-// quarantine block merging process does not leak memory used for quarantine
-// blocks.
-// TODO(alekseyshl): Add more comprehensive test verifying quarantine size
-// directly (requires quarantine stats exposed in allocator stats and API).
-static const int kAllocSize = 1;
-
-void *ThreadFn(void *unused) {
-  char *temp = new char[kAllocSize];
-  memset(temp, -1, kAllocSize);
-  delete [] (temp);
-  return NULL;
-}
-
-int main() {
-  // Warm up all internal structures.
-  pthread_t t;
-  pthread_create(&t, 0, ThreadFn, 0);
-  pthread_join(t, 0);
-
-  size_t heap_size = __sanitizer_get_heap_size();
-  fprintf(stderr, "Heap size: %zd\n", heap_size);
-
-  for (int i = 0; i < kNumThreads; i++) {
-    pthread_t t;
-    pthread_create(&t, 0, ThreadFn, 0);
-    pthread_join(t, 0);
-
-    size_t new_heap_size = __sanitizer_get_heap_size();
-  }
-
-  size_t new_heap_size = __sanitizer_get_heap_size();
-  fprintf(stderr, "New heap size: %zd\n", new_heap_size);
-  if (new_heap_size - heap_size < kHeapSizeIncrementLimit)
-    fprintf(stderr, "Heap growth is within limits\n");
-}
-
-// CHECK-SMALL-LOCAL-CACHE-SMALL-OVERHEAD: Heap growth is within limits

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc (removed)
@@ -1,45 +0,0 @@
-// Test thread_local_quarantine_size_kb
-
-// RUN: %clangxx_asan  %s -o %t
-// RUN: %env_asan_opts=thread_local_quarantine_size_kb=64:quarantine_size_mb=64:verbosity=1 %run %t 2>&1 | \
-// RUN:   FileCheck %s --allow-empty --check-prefix=CHECK-SMALL-LOCAL-CACHE-SMALL-OVERHEAD
-// RUN: %env_asan_opts=thread_local_quarantine_size_kb=0:quarantine_size_mb=0 %run %t 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-QUARANTINE-DISABLED-SMALL-OVERHEAD
-// RUN: %env_asan_opts=thread_local_quarantine_size_kb=0:quarantine_size_mb=64 not %run %t 2>&1 | \
-// RUN:   FileCheck %s --check-prefix=CHECK-FOR-PARAMETER-ERROR
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sanitizer/allocator_interface.h>
-
-// The idea is allocate a lot of small blocks, totaling 5Mb of user memory,
-// and verify that quarantine does not incur too much memory overhead.
-// There's always an overhead for red zones, shadow memory and such, but
-// quarantine accounting should not significantly contribute to that.
-// The zero sized thread local cache is specifically tested since it used to
-// generate a huge overhead of almost empty quarantine batches.
-static const size_t kHeapSizeIncrementLimit = 12 << 20;
-static const int kNumAllocs = 20000;
-static const int kAllocSize = 256;
-
-int main() {
-  size_t heap_size = __sanitizer_get_heap_size();
-  fprintf(stderr, "Heap size: %zd\n", heap_size);
-
-  for (int i = 0; i < kNumAllocs; i++) {
-    char *temp = new char[kAllocSize];
-    memset(temp, -1, kAllocSize);
-    delete [] (temp);
-  }
-
-  size_t new_heap_size = __sanitizer_get_heap_size();
-  fprintf(stderr, "New heap size: %zd\n", new_heap_size);
-  if (new_heap_size - heap_size < kHeapSizeIncrementLimit)
-    fprintf(stderr, "Heap growth is within limits\n");
-}
-
-// CHECK-SMALL-LOCAL-CACHE-SMALL-OVERHEAD: thread_local_quarantine_size_kb=64K
-// CHECK-SMALL-LOCAL-CACHE-SMALL-OVERHEAD: Heap growth is within limits
-// CHECK-QUARANTINE-DISABLED-SMALL-OVERHEAD: Heap growth is within limits
-// CHECK-FOR-PARAMETER-ERROR: thread_local_quarantine_size_kb can be set to 0 only when quarantine_size_mb is set to 0

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/uar_signals.cc (removed)
@@ -1,77 +0,0 @@
-// This test checks that the implementation of use-after-return
-// is async-signal-safe.
-// RUN: %clangxx_asan -std=c++11 -O1 %s -o %t -pthread && %run %t
-// REQUIRES: stable-runtime
-#include <signal.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <pthread.h>
-#include <initializer_list>
-
-int *g;
-int n_signals;
-
-typedef void (*Sigaction)(int, siginfo_t *, void *);
-
-void SignalHandler(int, siginfo_t*, void*) {
-  int local;
-  g = &local;
-  n_signals++;
-}
-
-static void EnableSigprof(Sigaction SignalHandler) {
-  struct sigaction sa;
-  sa.sa_sigaction = SignalHandler;
-  sa.sa_flags = SA_RESTART | SA_SIGINFO;
-  sigemptyset(&sa.sa_mask);
-  if (sigaction(SIGPROF, &sa, NULL) != 0) {
-    perror("sigaction");
-    abort();
-  }
-  struct itimerval timer;
-  timer.it_interval.tv_sec = 0;
-  timer.it_interval.tv_usec = 1;
-  timer.it_value = timer.it_interval;
-  if (setitimer(ITIMER_PROF, &timer, 0) != 0) {
-    perror("setitimer");
-    abort();
-  }
-}
-
-void RecursiveFunction(int depth) {
-  if (depth == 0) return;
-  int local;
-  g = &local;
-  // printf("r: %p\n", &local);
-  // printf("[%2d] n_signals: %d\n", depth, n_signals);
-  RecursiveFunction(depth - 1);
-  RecursiveFunction(depth - 1);
-}
-
-void *FastThread(void *) {
-  RecursiveFunction(1);
-  return NULL;
-}
-
-void *SlowThread(void *) {
-  RecursiveFunction(1);
-  return NULL;
-}
-
-int main(int argc, char **argv) {
-  EnableSigprof(SignalHandler);
-
-  for (auto Thread : {&FastThread, &SlowThread}) {
-    for (int i = 0; i < 1000; i++) {
-      fprintf(stderr, ".");
-      const int kNumThread = sizeof(void*) == 8 ? 32 : 8;
-      pthread_t t[kNumThread];
-      for (int i = 0; i < kNumThread; i++)
-        pthread_create(&t[i], 0, Thread, 0);
-      for (int i = 0; i < kNumThread; i++)
-        pthread_join(t[i], 0);
-    }
-    fprintf(stderr, "\n");
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc (removed)
@@ -1,35 +0,0 @@
-// Test that TLS is unpoisoned on thread death.
-// REQUIRES: x86-target-arch && !android
-
-// RUN: %clangxx_asan -O1 %s -pthread -o %t && %run %t 2>&1
-
-#include <assert.h>
-#include <pthread.h>
-#include <stdio.h>
-
-#include <sanitizer/asan_interface.h>
-
-__thread int64_t tls_var[2];
-
-volatile int64_t *p_tls_var;
-
-void *first(void *arg) {
-  ASAN_POISON_MEMORY_REGION(&tls_var, sizeof(tls_var));
-  p_tls_var = tls_var;
-  return 0;
-}
-
-void *second(void *arg) {
-  assert(tls_var == p_tls_var);
-  *p_tls_var = 1;
-  return 0;
-}
-
-int main(int argc, char *argv[]) {
-  pthread_t p;
-  assert(0 == pthread_create(&p, 0, first, 0));
-  assert(0 == pthread_join(p, 0));
-  assert(0 == pthread_create(&p, 0, second, 0));
-  assert(0 == pthread_join(p, 0));
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/vfork.cc (removed)
@@ -1,31 +0,0 @@
-// https://github.com/google/sanitizers/issues/925
-// RUN: %clang_asan -O0 %s -o %t && %run %t 2>&1
-
-// REQUIRES: aarch64-target-arch || x86_64-target-arch || i386-target-arch || arm-target-arch
-
-#include <assert.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-__attribute__((noinline, no_sanitize("address"))) void child() {
-  alignas(8) char x[100000];
-  __asan_poison_memory_region(x, sizeof(x));
-  _exit(0);
-}
-
-__attribute__((noinline, no_sanitize("address"))) void parent() {
-  alignas(8) char x[100000];
-  assert(__asan_address_is_poisoned(x + 5000) == 0);
-}
-
-int main(int argc, char **argv) {
-  if (vfork())
-    parent();
-  else
-    child();
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc (removed)
@@ -1,4 +0,0 @@
-// Test that asan_symbolize does not hang when provided with an non-existing
-// path.
-// RUN: echo '#0 0xabcdabcd (%t/bad/path+0x1234)' | %asan_symbolize | FileCheck %s
-// CHECK: #0 0xabcdabcd

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc (removed)
@@ -1,64 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-//
-// Check that asan_symbolize.py script works (for binaries, ASan RTL and
-// shared object files.
-
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s %libdl -o %t
-// RUN: %env_asan_opts=symbolize=0 not %run %t 2>&1 | %asan_symbolize | FileCheck %s
-// REQUIRES: stable-runtime
-
-// UNSUPPORTED: ios
-
-#if !defined(SHARED_LIB)
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <string>
-
-using std::string;
-
-typedef void (fun_t)(int*, int);
-
-int main(int argc, char *argv[]) {
-  string path = string(argv[0]) + "-so.so";
-  printf("opening %s ... \n", path.c_str());
-  void *lib = dlopen(path.c_str(), RTLD_NOW);
-  if (!lib) {
-    printf("error in dlopen(): %s\n", dlerror());
-    return 1;
-  }
-  fun_t *inc2 = (fun_t*)dlsym(lib, "inc2");
-  if (!inc2) return 1;
-  printf("ok\n");
-  int *array = (int*)malloc(40);
-  inc2(array, 1);
-  inc2(array, -1);  // BOOM
-  // CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
-  // CHECK: READ of size 4 at 0x{{.*}}
-  // CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:[[@LINE+21]]
-  // CHECK: #1 {{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-4]]
-  // CHECK: allocated by thread T{{.*}} here:
-  // CHECK: #{{.*}} in {{(wrap_|__interceptor_)?}}malloc
-  // CHECK: #{{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-9]]
-  return 0;
-}
-#else  // SHARED_LIBS
-#include <stdio.h>
-#include <string.h>
-
-int pad[10];
-int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-extern "C"
-void inc(int index) {
-  GLOB[index]++;
-}
-
-extern "C"
-void inc2(int *a, int index) {
-  a[index]++;
-}
-#endif  // SHARED_LIBS

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cpp Mon Aug  5 09:48:12 2019
@@ -38,11 +38,11 @@ int main(int argc, char *argv[]) {
   inc2(array, -1);  // BOOM
   // CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
   // CHECK: READ of size 4 at 0x{{.*}}
-  // CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:[[@LINE+21]]
-  // CHECK: #1 {{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-4]]
+  // CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cpp:[[@LINE+21]]
+  // CHECK: #1 {{.*}} in main {{.*}}asan-symbolize-sanity-test.cpp:[[@LINE-4]]
   // CHECK: allocated by thread T{{.*}} here:
   // CHECK: #{{.*}} in {{(wrap_|__interceptor_)?}}malloc
-  // CHECK: #{{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-9]]
+  // CHECK: #{{.*}} in main {{.*}}asan-symbolize-sanity-test.cpp:[[@LINE-9]]
   return 0;
 }
 #else  // SHARED_LIBS

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/logging_options_in_help.cc (removed)
@@ -1,5 +0,0 @@
-// RUN: %asan_symbolize --help > %t_help_output.txt
-// RUN: FileCheck %s -input-file=%t_help_output.txt
-// CHECK: optional arguments:
-// CHECK: --log-dest
-// CHECK: --log-level

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_help_output.cc (removed)
@@ -1,7 +0,0 @@
-// Check help output.
-// RUN: %asan_symbolize --log-level info --plugins %S/plugin_no_op.py --help 2>&1 | FileCheck %s
-// CHECK: Registering plugin NoOpPlugin
-// CHECK: Adding --unlikely-option-name-XXX option
-// CHECK: optional arguments:
-// CHECK: --unlikely-option-name-XXX
-

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/plugin_no_op_symbolicate.cc (removed)
@@ -1,24 +0,0 @@
-// UNSUPPORTED: ios, android
-// Check plugin command line args get parsed and that plugin functions get called as expected.
-
-// RUN: %clangxx_asan -O0 -g %s -o %t.executable
-// RUN: not %env_asan_opts=symbolize=0 %run %t.executable > %t.log 2>&1
-// RUN: %asan_symbolize --plugins %S/plugin_no_op.py --log-level info -l %t.log --unlikely-option-name-XXX=15 2>&1 | FileCheck %s
-
-// CHECK: GOT --unlikely-option-name-XXX=15
-// CHECK: filter_binary_path called in NoOpPlugin
-// CHECK: destroy() called on NoOpPlugin
-
-#include <cstdlib>
-extern "C" void foo(int* a) {
-  *a = 5;
-}
-
-int main() {
-  int* a = (int*) malloc(sizeof(int));
-  if (!a)
-    return 0;
-  free(a);
-  foo(a);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_dest.cc (removed)
@@ -1,3 +0,0 @@
-// RUN: %asan_symbolize --log-level debug --log-dest %t_debug_log_output.txt --help
-// RUN: FileCheck %s -input-file=%t_debug_log_output.txt -check-prefix=DEBUG-CHECK
-// DEBUG-CHECK: DEBUG: [setup_logging() asan_symbolize.py:{{[0-9]+}}] Logging level set to "debug"

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan_symbolize_script/set_log_level.cc (removed)
@@ -1,8 +0,0 @@
-// RUN: %asan_symbolize --log-level debug --help 2> %t_debug_log_output.txt
-// RUN: FileCheck %s -input-file=%t_debug_log_output.txt -check-prefix=DEBUG-CHECK
-// DEBUG-CHECK: DEBUG: [setup_logging() asan_symbolize.py:{{[0-9]+}}] Logging level set to "debug"
-//
-// FileCheck doesn't like empty files so add stdout too.
-// RUN: %asan_symbolize --log-level info --help > %t_info_log_output.txt 2>&1
-// RUN: FileCheck %s -input-file=%t_info_log_output.txt -check-prefix=INFO-CHECK
-// INFO-CHECK-NOT: DEBUG: [setup_logging() asan_symbolize.py:{{[0-9]+}}]

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asprintf.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv) {
-  char *p;
-  int res = asprintf(&p, "%d", argc);
-  fprintf(stderr, "x%d %sx\n", res, p);
-  // CHECK: x1 1x
-  free(p);
-  fprintf(stderr, "DONE\n");
-  // CHECK: DONE
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc (removed)
@@ -1,6 +0,0 @@
-// Make sure we don't report a leak nor hang.
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t
-#include <stdlib.h>
-#include <unistd.h>
-int *p;
-int main() { posix_memalign((void **)&p, 4096, 1 << 20); }

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/bcmp_test.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: compiler-rt-optimized, (linux && !android) || openbsd || freebsd || netbsd 
-// XFAIL: darwin
-
-#include <string.h>
-int main(int argc, char **argv) {
-  char a1[] = {static_cast<char>(argc), 2, 3, 4};
-  char a2[] = {1, static_cast<char>(2 * argc), 3, 4};
-  int res = bcmp(a1, a2, 4 + argc); // BOOM
-  // CHECK: AddressSanitizer: stack-buffer-overflow
-  // CHECK: {{#1.*bcmp}}
-  // CHECK: {{#2.*main}}
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc (removed)
@@ -1,35 +0,0 @@
-// Check that when the program closed its std(in|out|err), running the external
-// symbolizer still works.
-
-// RUN: rm -f %t.log.*
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=log_path='"%t.log"':verbosity=2 not %run %t
-// RUN: FileCheck %s --check-prefix=CHECK-FILE < %t.log.*
-
-// FIXME: copy %t.log back from the device and re-enable on Android.
-// UNSUPPORTED: android
-// UNSUPPORTED: ios
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-int main(int argc, char **argv) {
-  int result = fprintf(stderr, "Closing streams.\n");
-  assert(result > 0);
-  close(STDIN_FILENO);
-  close(STDOUT_FILENO);
-  close(STDERR_FILENO);
-  result = fprintf(stderr, "Can you hear me now?\n");
-  assert(result < 0);
-  char *x = (char *)malloc(10 * sizeof(char));
-  free(x);
-  x[argc] = 'X';  // BOOM
-  // CHECK-FILE: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK-FILE:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-  // CHECK-FILE: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK-FILE: {{    #0 0x.* in main .*closed-fds.cc:}}[[@LINE-4]]
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/closed-fds.cpp Mon Aug  5 09:48:12 2019
@@ -30,6 +30,6 @@ int main(int argc, char **argv) {
   // CHECK-FILE: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK-FILE:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK-FILE: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK-FILE: {{    #0 0x.* in main .*closed-fds.cc:}}[[@LINE-4]]
+  // CHECK-FILE: {{    #0 0x.* in main .*closed-fds.cpp:}}[[@LINE-4]]
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/concurrent_overflow.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clangxx_asan -O0 -w %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Checks that concurrent reports will not trigger false "nested bug" reports.
-// Regression test for https://github.com/google/sanitizers/issues/858
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static void *start_routine(void *arg) {
-  volatile int *counter = (volatile int *)arg;
-  char buf[8];
-  __atomic_sub_fetch(counter, 1, __ATOMIC_SEQ_CST);
-  while (*counter)
-    ;
-  buf[0] = buf[9];
-  return 0;
-}
-
-int main(void) {
-  const int n_threads = 8;
-  int i, counter = n_threads;
-  pthread_t thread[n_threads];
-
-  for (i = 0; i < n_threads; ++i)
-    pthread_create(&thread[i], NULL, &start_routine, (void *)&counter);
-  for (i = 0; i < n_threads; ++i)
-    pthread_join(thread[i], NULL);
-  return 0;
-}
-
-// CHECK-NOT: nested bug
-// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address
-// CHECK: SUMMARY: AddressSanitizer: stack-buffer-overflow

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/coverage-fork.cc (removed)
@@ -1,41 +0,0 @@
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir && cd %t-dir
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: android
-//
-// Ideally a forked-subprocess should only report it's own coverage,
-// not parent's one. But trace-pc-guard currently does nothing special for fork,
-// and thus this test is relaxed.
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-__attribute__((noinline))
-void foo() { printf("foo\n"); }
-
-__attribute__((noinline))
-void bar() { printf("bar\n"); }
-
-__attribute__((noinline))
-void baz() { printf("baz\n"); }
-
-int main(int argc, char **argv) {
-  pid_t child_pid = fork();
-  if (child_pid == 0) {
-    fprintf(stderr, "Child PID: %d\n", getpid());
-    baz();
-  } else {
-    fprintf(stderr, "Parent PID: %d\n", getpid());
-    foo();
-    bar();
-  }
-  return 0;
-}
-
-// CHECK-DAG: Child PID: [[ChildPID:[0-9]+]]
-// CHECK-DAG: [[ChildPID]].sancov: {{.*}} PCs written
-// CHECK-DAG: Parent PID: [[ParentPID:[0-9]+]]
-// CHECK-DAG: [[ParentPID]].sancov: 3 PCs written

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/coverage-module-unloaded.cc (removed)
@@ -1,51 +0,0 @@
-// Check that unloading a module doesn't break coverage dumping for remaining
-// modules.
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib1 -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib2 -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %libdl -o %t.exe
-// RUN: mkdir -p %t.tmp/coverage-module-unloaded && cd %t.tmp/coverage-module-unloaded
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.exe %dynamiclib1 %dynamiclib2 2>&1        | FileCheck %s
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.exe %dynamiclib1 %dynamiclib2 foo 2>&1    | FileCheck %s
-//
-// https://code.google.com/p/address-sanitizer/issues/detail?id=263
-// XFAIL: android
-// UNSUPPORTED: ios
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#ifdef SHARED
-extern "C" {
-void bar() { printf("bar\n"); }
-}
-#else
-
-int main(int argc, char **argv) {
-  fprintf(stderr, "PID: %d\n", getpid());
-  assert(argc > 2);
-  void *handle1 = dlopen(argv[1], RTLD_LAZY);  // %dynamiclib1
-  assert(handle1);
-  void (*bar1)() = (void (*)())dlsym(handle1, "bar");
-  assert(bar1);
-  bar1();
-  void *handle2 = dlopen(argv[2], RTLD_LAZY);  // %dynamiclib2
-  assert(handle2);
-  void (*bar2)() = (void (*)())dlsym(handle2, "bar");
-  assert(bar2);
-  bar2();
-
-  // It matters whether the unloaded module has a higher or lower address range
-  // than the remaining one. Make sure to test both cases.
-  if (argc < 2)
-    dlclose(bar1 < bar2 ? handle1 : handle2);
-  else
-    dlclose(bar1 < bar2 ? handle2 : handle1);
-  return 0;
-}
-#endif
-
-// CHECK: PID: [[PID:[0-9]+]]
-// CHECK-DAG: exe{{.*}}[[PID]].sancov: {{.*}}PCs written
-// CHECK-DAG: dynamic{{.*}}[[PID]].sancov: {{.*}}PCs written

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc (removed)
@@ -1,67 +0,0 @@
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
-// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s
-//
-// UNSUPPORTED: ios
-
-// XFAIL: i386-netbsd
-
-#include <stdio.h>
-
-#include <sanitizer/coverage_interface.h>
-
-#ifdef SHARED
-void bar1() { printf("bar1\n"); }
-void bar2() { printf("bar2\n"); }
-#else
-__attribute__((noinline)) void foo1() { printf("foo1\n"); }
-__attribute__((noinline)) void foo2() { printf("foo2\n"); }
-void bar1();
-void bar2();
-
-int main(int argc, char **argv) {
-  fprintf(stderr, "RESET\n");
-  __sanitizer_cov_reset();
-  foo1();
-  foo2();
-  bar1();
-  bar2();
-  __sanitizer_cov_dump();
-// CHECK: RESET
-// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
-// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written
-
-  fprintf(stderr, "RESET\n");
-  __sanitizer_cov_reset();
-  foo1();
-  bar1();
-  __sanitizer_cov_dump();
-// CHECK: RESET
-// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 1 PCs written
-// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
-
-  fprintf(stderr, "RESET\n");
-  __sanitizer_cov_reset();
-  foo1();
-  foo2();
-  __sanitizer_cov_dump();
-// CHECK: RESET
-// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
-
-  fprintf(stderr, "RESET\n");
-  __sanitizer_cov_reset();
-  bar1();
-  bar2();
-  __sanitizer_cov_dump();
-// CHECK: RESET
-// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written
-
-  fprintf(stderr, "RESET\n");
-  __sanitizer_cov_reset();
-// CHECK: RESET
-
-  bar2();
-// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
-}
-#endif

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/coverage-reset.cpp Mon Aug  5 09:48:12 2019
@@ -29,8 +29,8 @@ int main(int argc, char **argv) {
   bar2();
   __sanitizer_cov_dump();
 // CHECK: RESET
-// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
-// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written
+// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cpp{{.*}}.sancov: 2 PCs written
+// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cpp{{.*}}.sancov: 2 PCs written
 
   fprintf(stderr, "RESET\n");
   __sanitizer_cov_reset();
@@ -38,8 +38,8 @@ int main(int argc, char **argv) {
   bar1();
   __sanitizer_cov_dump();
 // CHECK: RESET
-// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 1 PCs written
-// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
+// CHECK-DAG: SanitizerCoverage: ./coverage-reset.cpp{{.*}}.sancov: 1 PCs written
+// CHECK-DAG: SanitizerCoverage: ./libcoverage-reset.cpp{{.*}}.sancov: 1 PCs written
 
   fprintf(stderr, "RESET\n");
   __sanitizer_cov_reset();
@@ -47,7 +47,7 @@ int main(int argc, char **argv) {
   foo2();
   __sanitizer_cov_dump();
 // CHECK: RESET
-// CHECK: SanitizerCoverage: ./coverage-reset.cc{{.*}}.sancov: 2 PCs written
+// CHECK: SanitizerCoverage: ./coverage-reset.cpp{{.*}}.sancov: 2 PCs written
 
   fprintf(stderr, "RESET\n");
   __sanitizer_cov_reset();
@@ -55,13 +55,13 @@ int main(int argc, char **argv) {
   bar2();
   __sanitizer_cov_dump();
 // CHECK: RESET
-// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 2 PCs written
+// CHECK: SanitizerCoverage: ./libcoverage-reset.cpp{{.*}}.sancov: 2 PCs written
 
   fprintf(stderr, "RESET\n");
   __sanitizer_cov_reset();
 // CHECK: RESET
 
   bar2();
-// CHECK: SanitizerCoverage: ./libcoverage-reset.cc{{.*}}.sancov: 1 PCs written
+// CHECK: SanitizerCoverage: ./libcoverage-reset.cpp{{.*}}.sancov: 1 PCs written
 }
 #endif

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/coverage.cc (removed)
@@ -1,77 +0,0 @@
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t
-// RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t 2>&1         | FileCheck %s --check-prefix=CHECK-main
-// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV1
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t foo 2>&1     | FileCheck %s --check-prefix=CHECK-foo
-// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t bar 2>&1     | FileCheck %s --check-prefix=CHECK-bar
-// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t foo bar 2>&1 | FileCheck %s --check-prefix=CHECK-foo-bar
-// RUN: %sancov print coverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
-// RUN: %sancov print libcoverage.*sancov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV1
-// RUN: %sancov merge coverage.*sancov > merged-cov
-// RUN: %sancov print merged-cov 2>&1 | FileCheck %s --check-prefix=CHECK-SANCOV2
-// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4    2>&1 | FileCheck %s --check-prefix=CHECK-report
-// RUN: %env_asan_opts=coverage=1:verbosity=1 not %run %t foo bar 4 5  2>&1 | FileCheck %s --check-prefix=CHECK-segv
-// RUN: cd .. && rm -rf %t-dir
-//
-// https://code.google.com/p/address-sanitizer/issues/detail?id=263
-// XFAIL: android
-// XFAIL: i386-netbsd
-// UNSUPPORTED: ios
-
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef SHARED
-void bar() { printf("bar\n"); }
-#else
-__attribute__((noinline))
-void foo() { printf("foo\n"); }
-extern void bar();
-
-int G[4];
-
-int main(int argc, char **argv) {
-  fprintf(stderr, "PID: %d\n", getpid());
-  for (int i = 1; i < argc; i++) {
-    if (!strcmp(argv[i], "foo"))
-      foo();
-    if (!strcmp(argv[i], "bar"))
-      bar();
-  }
-  if (argc == 5) {
-    static volatile char *zero = 0;
-    *zero = 0;  // SEGV if argc == 5.
-  }
-  return G[argc];  // Buffer overflow if argc >= 4.
-}
-#endif
-
-// CHECK-main: PID: [[PID:[0-9]+]]
-// CHECK-main: [[PID]].sancov: 1 PCs written
-// CHECK-main-NOT: .so.[[PID]]
-//
-// CHECK-foo: PID: [[PID:[0-9]+]]
-// CHECK-foo: [[PID]].sancov: 2 PCs written
-// CHECK-foo-NOT: .so.[[PID]]
-//
-// CHECK-bar: PID: [[PID:[0-9]+]]
-// CHECK-bar-DAG: .so.[[PID]].sancov: 1 PCs written
-// CHECK-bar-DAG: [[PID]].sancov: 1 PCs written
-//
-// CHECK-foo-bar: PID: [[PID:[0-9]+]]
-// CHECK-foo-bar-DAG: so.[[PID]].sancov: 1 PCs written
-// CHECK-foo-bar-DAG: [[PID]].sancov: 2 PCs written
-//
-// CHECK-report: AddressSanitizer: global-buffer-overflow
-// CHECK-report: PCs written
-//
-// CHECK-segv: AddressSanitizer: SEGV
-// CHECK-segv: PCs written
-//
-// CHECK-SANCOV1: 1 PCs total
-// CHECK-SANCOV2: 2 PCs total

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/current_allocated_bytes.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -pthread -o %t && %run %t
-// RUN: %clangxx_asan -O2 %s -pthread -o %t && %run %t
-// REQUIRES: stable-runtime
-
-#include <assert.h>
-#include <pthread.h>
-#include <sanitizer/allocator_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-const size_t kLargeAlloc = 1UL << 20;
-
-void* allocate(void *arg) {
-  volatile void *ptr = malloc(kLargeAlloc);
-  free((void*)ptr);
-  return 0;
-}
-
-void* check_stats(void *arg) {
-  assert(__sanitizer_get_current_allocated_bytes() > 0);
-  return 0;
-}
-
-int main() {
-  size_t used_mem = __sanitizer_get_current_allocated_bytes();
-  printf("Before: %zu\n", used_mem);
-  const int kNumIterations = 1000;
-  for (int iter = 0; iter < kNumIterations; iter++) {
-    pthread_t thr[4];
-    for (int j = 0; j < 4; j++) {
-      assert(0 ==
-             pthread_create(&thr[j], 0, (j < 2) ? allocate : check_stats, 0));
-    }
-    for (int j = 0; j < 4; j++)
-      assert(0 == pthread_join(thr[j], 0));
-    used_mem = __sanitizer_get_current_allocated_bytes();
-    if (used_mem > kLargeAlloc) {
-      printf("After iteration %d: %zu\n", iter, used_mem);
-      return 1;
-    }
-  }
-  printf("Success after %d iterations\n", kNumIterations);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/deep_call_stack.cc (removed)
@@ -1,29 +0,0 @@
-// Check that UAR mode can handle very deep recusrion.
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: ulimit -s 4096
-// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s
-
-// Also check that use_sigaltstack+verbosity doesn't crash.
-// RUN: %env_asan_opts=verbosity=1:use_sigaltstack=1:detect_stack_use_after_return=1 %run %t  | FileCheck %s
-
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-
-__attribute__((noinline))
-void RecursiveFunc(int depth, int *ptr) {
-  if ((depth % 1000) == 0)
-    printf("[%05d] ptr: %p\n", depth, ptr);
-  if (depth == 0)
-    return;
-  int local;
-  RecursiveFunc(depth - 1, &local);
-}
-
-int main(int argc, char **argv) {
-  RecursiveFunc(15000, 0);
-  return 0;
-}
-// CHECK: [15000] ptr:
-// CHECK: [07000] ptr:
-// CHECK: [00000] ptr:

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/deep_thread_stack.cc (removed)
@@ -1,58 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -pthread -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -pthread -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -pthread -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -pthread -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-
-#include <pthread.h>
-
-int *x;
-
-void *AllocThread(void *arg) {
-  x = new int;
-  *x = 42;
-  return NULL;
-}
-
-void *FreeThread(void *arg) {
-  delete x;
-  return NULL;
-}
-
-void *AccessThread(void *arg) {
-  *x = 43;  // BOOM
-  return NULL;
-}
-
-typedef void* (*callback_type)(void* arg);
-
-void *RunnerThread(void *function) {
-  pthread_t thread;
-  pthread_create(&thread, NULL, (callback_type)function, NULL);
-  pthread_join(thread, NULL);
-  return NULL;
-}
-
-void RunThread(callback_type function) {
-  pthread_t runner;
-  pthread_create(&runner, NULL, RunnerThread, (void*)function);
-  pthread_join(runner, NULL);
-}
-
-int main(int argc, char *argv[]) {
-  RunThread(AllocThread);
-  RunThread(FreeThread);
-  RunThread(AccessThread);
-  return (x != 0);
-}
-
-// CHECK: AddressSanitizer: heap-use-after-free
-// CHECK: WRITE of size 4 at 0x{{.*}} thread T[[ACCESS_THREAD:[0-9]+]]
-// CHECK: freed by thread T[[FREE_THREAD:[0-9]+]] here:
-// CHECK: previously allocated by thread T[[ALLOC_THREAD:[0-9]+]] here:
-// CHECK: Thread T[[ACCESS_THREAD]] created by T[[ACCESS_RUNNER:[0-9]+]] here:
-// CHECK: Thread T[[ACCESS_RUNNER]] created by T0 here:
-// CHECK: Thread T[[FREE_THREAD]] created by T[[FREE_RUNNER:[0-9]+]] here:
-// CHECK: Thread T[[FREE_RUNNER]] created by T0 here:
-// CHECK: Thread T[[ALLOC_THREAD]] created by T[[ALLOC_RUNNER:[0-9]+]] here:
-// CHECK: Thread T[[ALLOC_RUNNER]] created by T0 here:

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/dlclose-test.cc (removed)
@@ -1,108 +0,0 @@
-// Regression test for
-// http://code.google.com/p/address-sanitizer/issues/detail?id=19
-// Bug description:
-// 1. application dlopens foo.so
-// 2. asan registers all globals from foo.so
-// 3. application dlcloses foo.so
-// 4. application mmaps some memory to the location where foo.so was before
-// 5. application starts using this mmaped memory, but asan still thinks there
-// are globals.
-// 6. BOOM
-
-// This sublte test assumes that after a foo.so is dlclose-d
-// we can mmap the region of memory that has been occupied by the library.
-// It works on x86 Linux, but not necessary anywhere else.
-// REQUIRES: x86-target-arch
-
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s %libdl -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O1 %s %libdl -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O2 %s %libdl -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O3 %s %libdl -o %t && %run %t 2>&1 | FileCheck %s
-
-// XFAIL: i386-netbsd
-
-#if !defined(SHARED_LIB)
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <unistd.h>
-
-#include <string>
-
-#if defined(__FreeBSD__)
-// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before
-// that, it was never implemented. So just define it to zero.
-#undef MAP_NORESERVE
-#define MAP_NORESERVE 0
-#endif
-
-using std::string;
-
-typedef int *(fun_t)();
-
-int main(int argc, char *argv[]) {
-  string path = string(argv[0]) + "-so.so";
-  size_t PageSize = sysconf(_SC_PAGESIZE);
-  printf("opening %s ... \n", path.c_str());
-  void *lib = dlopen(path.c_str(), RTLD_NOW);
-  if (!lib) {
-    printf("error in dlopen(): %s\n", dlerror());
-    return 1;
-  }
-  fun_t *get = (fun_t*)dlsym(lib, "get_address_of_static_var");
-  if (!get) {
-    printf("failed dlsym\n");
-    return 1;
-  }
-  int *addr = get();
-  assert(((size_t)addr % 32) == 0);  // should be 32-byte aligned.
-  printf("addr: %p\n", addr);
-  addr[0] = 1;  // make sure we can write there.
-
-  // Now dlclose the shared library.
-  printf("attempting to dlclose\n");
-  if (dlclose(lib)) {
-    printf("failed to dlclose\n");
-    return 1;
-  }
-  // Now, the page where 'addr' is unmapped. Map it.
-  size_t page_beg = ((size_t)addr) & ~(PageSize - 1);
-  void *res = mmap((void*)(page_beg), PageSize,
-                   PROT_READ | PROT_WRITE,
-                   MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE, -1, 0);
-  if (res == (char*)-1L) {
-    printf("failed to mmap\n");
-    return 1;
-  }
-  addr[1] = 2;  // BOOM (if the bug is not fixed).
-  printf("PASS\n");
-  // CHECK: PASS
-  return 0;
-}
-#else  // SHARED_LIB
-#include <stdio.h>
-
-static int pad1;
-static int static_var;
-static int pad2;
-
-extern "C"
-int *get_address_of_static_var() {
-  return &static_var;
-}
-
-__attribute__((constructor))
-void at_dlopen() {
-  printf("%s: I am being dlopened\n", __FILE__);
-}
-__attribute__((destructor))
-void at_dlclose() {
-  printf("%s: I am being dlclosed\n", __FILE__);
-}
-#endif  // SHARED_LIB

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/fgets_fputs.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx_asan -g %s -o %t
-// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-FGETS
-// RUN: not %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK-FPUTS
-// RUN: not %run %t 3 2>&1 | FileCheck %s --check-prefix=CHECK-PUTS
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int test_fgets(const char *testfile) {
-  char buf[2];
-  FILE *fp = fopen(testfile, "r");
-  assert(fp);
-  fgets(buf, sizeof(buf) + 1, fp); // BOOM
-  fclose(fp);
-  return 0;
-}
-
-int test_fputs() {
-  char buf[1] = {'x'}; // Note: not nul-terminated
-  FILE *fp = fopen("/dev/null", "w");
-  assert(fp);
-  fputs(buf, fp); // BOOM
-  fclose(fp);
-  return 0;
-}
-
-int test_puts() {
-  char *p = strdup("x");
-  free(p);
-  puts(p); // BOOM
-  return 0;
-}
-
-int main(int argc, char *argv[]) {
-  assert(argc >= 2);
-  int testno = argv[1][0] - '0';
-  if (testno == 1) {
-    return test_fgets(argv[0]);
-  }
-  if (testno == 2)
-    return test_fputs();
-  if (testno == 3)
-    return test_puts();
-  return 1;
-}
-
-// CHECK-FGETS: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
-// CHECK-FGETS: #{{.*}} in {{(wrap_|__interceptor_)?}}fgets
-// CHECK-FPUTS: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
-// CHECK-FPUTS: #{{.*}} in {{(wrap_|__interceptor_)?}}fputs
-// CHECK-PUTS: {{.*ERROR: AddressSanitizer: heap-use-after-free}}
-// CHECK-PUTS: #{{.*}} in {{(wrap_|__interceptor_)?}}puts

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/fread_fwrite.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clangxx_asan -g %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-FWRITE
-// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK-FREAD
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int test_fread() {
-  FILE *f = fopen("/dev/zero", "r");
-  char buf[2];
-  fread(buf, sizeof(buf), 2, f); // BOOM
-  fclose(f);
-  return 0;
-}
-
-int test_fwrite() {
-  FILE *f = fopen("/dev/null", "w");
-  char buf[2];
-  fwrite(buf, sizeof(buf), 2, f); // BOOM
-  return fclose(f);
-}
-
-int main(int argc, char *argv[]) {
-  if (argc > 1)
-    test_fread();
-  else
-    test_fwrite();
-  return 0;
-}
-
-// CHECK-FREAD: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
-// CHECK-FREAD: #{{.*}} in {{(wrap_|__interceptor_)?}}fread
-// CHECK-FWRITE: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
-// CHECK-FWRITE: #{{.*}} in {{(wrap_|__interceptor_)?}}fwrite

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/free_hook_realloc.cc (removed)
@@ -1,34 +0,0 @@
-// Check that free hook doesn't conflict with Realloc.
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sanitizer/allocator_interface.h>
-
-static void *glob_ptr;
-
-extern "C" {
-void __sanitizer_free_hook(const volatile void *ptr) {
-  if (ptr == glob_ptr) {
-    *(int*)ptr = 0;
-    write(1, "FreeHook\n", sizeof("FreeHook\n"));
-  }
-}
-}
-
-int main() {
-  int *x = (int*)malloc(100);
-  x[0] = 42;
-  glob_ptr = x;
-  int *y = (int*)realloc(x, 200);
-  // Verify that free hook was called and didn't spoil the memory.
-  if (y[0] != 42) {
-    _exit(1);
-  }
-  write(1, "Passed\n", sizeof("Passed\n"));
-  free(y);
-  // CHECK: FreeHook
-  // CHECK: Passed
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/freopen.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-
-// This fails on i386 Linux due to a glibc versioned symbols mixup.
-// REQUIRES: asan-64-bits
-
-#include <assert.h>
-#include <stdio.h>
-
-int main() {
-  FILE *fp = fopen("/dev/null", "w");
-  assert(fp);
-  freopen(NULL, "a", fp);
-  fclose(fp);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/gc-test.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx_asan %s -pthread -o %t
-// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %clangxx_asan -O3 %s -pthread -o %t
-// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// REQUIRES: stable-runtime
-
-#include <assert.h>
-#include <stdio.h>
-#include <pthread.h>
-#include <sanitizer/asan_interface.h>
-
-static const int kNumThreads = 2;
-static const int kLeftRedzoneSize = sizeof(void *) * 4;
-
-void *Thread(void *unused)  {
-  void *fake_stack = __asan_get_current_fake_stack();
-  char var[15];
-  if (fake_stack) {
-    fprintf(stderr, "fake stack found: %p; var: %p\n", fake_stack, var);
-    // CHECK1: fake stack found
-    // CHECK1: fake stack found
-    void *beg, *end;
-    void *real_stack =
-        __asan_addr_is_in_fake_stack(fake_stack, &var[0], &beg, &end);
-    assert(real_stack);
-    assert((char*)beg <= (char*)&var[0]);
-    assert((char*)end > (char*)&var[0]);
-    for (int i = -kLeftRedzoneSize; i < 15; i++) {
-      void *beg1, *end1;
-      char *ptr = &var[0] + i;
-      void *real_stack1 =
-          __asan_addr_is_in_fake_stack(fake_stack, ptr, &beg1, &end1);
-      assert(real_stack == real_stack1);
-      assert(beg == beg1);
-      assert(end == end1);
-    }
-  } else {
-    fprintf(stderr, "no fake stack\n");
-    // CHECK0: no fake stack
-    // CHECK0: no fake stack
-  }
-  return NULL;
-}
-
-int main(int argc, char **argv) {
-  pthread_t t[kNumThreads];
-  for (int i = 0; i < kNumThreads; i++)
-    pthread_create(&t[i], 0, Thread, 0);
-  for (int i = 0; i < kNumThreads; i++)
-    pthread_join(t[i], 0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc (removed)
@@ -1,33 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-// UNSUPPORTED: ios
-//
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <glob.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <string>
-
-
-int main(int argc, char *argv[]) {
-  std::string path = argv[1];
-  std::string pattern = path + "/glob_test_root/*a";
-  printf("pattern: %s\n", pattern.c_str());
-
-  glob_t globbuf;
-  int res = glob(pattern.c_str(), 0, 0, &globbuf);
-
-  printf("%d %s\n", errno, strerror(errno));
-  assert(res == 0);
-  assert(globbuf.gl_pathc == 2);
-  printf("%zu\n", strlen(globbuf.gl_pathv[0]));
-  printf("%zu\n", strlen(globbuf.gl_pathv[1]));
-  globfree(&globbuf);
-  printf("PASS\n");
-  // CHECK: PASS
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error-torture.cc (removed)
@@ -1,80 +0,0 @@
-// Stress test recovery mode with many threads.
-//
-// RUN: %clangxx_asan -fsanitize-recover=address -pthread %s -o %t
-//
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >%t.log 2>&1
-// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 10
-// RUN: FileCheck %s <%t.log
-//
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
-// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 200
-// RUN: FileCheck %s <%t.log
-//
-// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
-// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 1
-// RUN: FileCheck %s <%t.log
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <time.h>
-
-#include <sanitizer/asan_interface.h>
-
-size_t nthreads = 10;
-size_t niter = 10;
-
-void random_delay(unsigned *seed) {
-  *seed = 1664525 * *seed + 1013904223;
-  struct timespec delay = { 0, static_cast<long>((*seed % 1000) * 1000) };
-  nanosleep(&delay, 0);
-}
-
-void *run(void *arg) {
-  unsigned seed = (unsigned)(size_t)arg;
-
-  volatile char tmp[2];
-  __asan_poison_memory_region(&tmp, sizeof(tmp));
-
-  for (size_t i = 0; i < niter; ++i) {
-    random_delay(&seed);
-    // CHECK: ERROR: AddressSanitizer: use-after-poison
-    volatile int idx = 0;
-    tmp[idx] = 0;
-  }
-
-  return 0;
-}
-
-int main(int argc, char **argv) {
-  if (argc != 3) {
-    fprintf(stderr, "Syntax: %s nthreads niter\n", argv[0]);
-    exit(1);
-  }
-
-  nthreads = (size_t)strtoul(argv[1], 0, 0);
-  niter = (size_t)strtoul(argv[2], 0, 0);
-
-  pthread_t *tids = new pthread_t[nthreads];
-
-  for (size_t i = 0; i < nthreads; ++i) {
-    if (0 != pthread_create(&tids[i], 0, run, (void *)i)) {
-      fprintf(stderr, "Failed to create thread\n");
-      exit(1);
-    }
-  }
-
-  for (size_t i = 0; i < nthreads; ++i) {
-    if (0 != pthread_join(tids[i], 0)) {
-      fprintf(stderr, "Failed to join thread\n");
-      exit(1);
-    }
-  }
-
-  // CHECK: All threads terminated
-  printf("All threads terminated\n");
-
-  delete [] tids;
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/halt_on_error_suppress_equal_pcs.cc (removed)
@@ -1,56 +0,0 @@
-// Test reports dedupication for recovery mode.
-//
-// RUN: %clang_asan -fsanitize-recover=address %s -o %t
-//
-// Check for reports dedupication.
-// RUN: %env_asan_opts=halt_on_error=false %run %t 2>&1 | FileCheck %s
-//
-// Check that we die after reaching different reports number threshold.
-// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 >%t1.log 2>&1
-// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t1.log | count 25
-//
-// Check suppress_equal_pcs=true behavior is equal to default one.
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=true %run %t 2>&1 | FileCheck %s
-//
-// Check suppress_equal_pcs=false behavior isn't equal to default one.
-// RUN: rm -f %t2.log
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t >%t2.log 2>&1
-// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t2.log | count 30
-
-#define ACCESS_ARRAY_FIVE_ELEMENTS(array, i)     \
-  array[i] = i;                                  \
-  array[i + 1] = i + 1;                          \
-  array[i + 2] = i + 2;                          \
-  array[i + 3] = i + 3;                          \
-  array[i + 4] = i + 4;                          \
-
-volatile int ten = 10;
-unsigned kNumIterations = 10;
-
-int main(int argc, char **argv) {
-  char a[10];
-  char b[10];
-
-  if (argc == 1) {
-    for (int i = 0; i < kNumIterations; ++i) {
-      // CHECK: READ of size 1
-      volatile int res = a[ten + i];
-      // CHECK: WRITE of size 1
-      a[i + ten] = res + 3;
-      // CHECK: READ of size 1
-      res = a[ten + i];
-      // CHECK-NOT: ERROR
-    }
-  } else {
-    for (int i = 0; i < kNumIterations; ++i) {
-      ACCESS_ARRAY_FIVE_ELEMENTS(a, ten);
-      ACCESS_ARRAY_FIVE_ELEMENTS(a, ten + 5);
-      ACCESS_ARRAY_FIVE_ELEMENTS(a, ten + 10);
-      ACCESS_ARRAY_FIVE_ELEMENTS(b, ten);
-      ACCESS_ARRAY_FIVE_ELEMENTS(b, ten + 5);
-      ACCESS_ARRAY_FIVE_ELEMENTS(b, ten + 10);
-    }
-  }
-  return 0;
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/handle_abort_on_error.cc (removed)
@@ -1,11 +0,0 @@
-// Regression test: this used to abort() in SIGABRT handler in an infinite loop.
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=handle_abort=1,abort_on_error=1 not --crash %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-
-int main() {
-  abort();
-  // CHECK: ERROR: AddressSanitizer: ABRT
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/init-order-pthread-create.cc (removed)
@@ -1,54 +0,0 @@
-// Check that init-order checking is properly disabled if pthread_create is
-// called.
-
-// RUN: %clangxx_asan -c -DCONFIG1 %s -o %t1.o
-// RUN: %clangxx_asan -c           %s -o %t2.o
-// RUN: %clangxx_asan -pthread %t1.o %t2.o -o %t
-// RUN: %env_asan_opts=strict_init_order=true %run %t
-
-#ifdef CONFIG1
-
-#include <stdio.h>
-#include <pthread.h>
-#include <unistd.h>
-
-void *bar(void *input, bool sleep_before_init) {
-  if (sleep_before_init)
-    usleep(500000);
-  return input;
-}
-
-void *glob = bar((void*)0x1234, false);
-extern void *glob2;
-
-void *poll(void *arg) {
-  void **glob = (void**)arg;
-  while (true) {
-    usleep(100000);
-    printf("glob is now: %p\n", *glob);
-  }
-}
-
-struct GlobalPollerStarter {
-  GlobalPollerStarter() {
-    pthread_t p;
-    pthread_attr_t attr;
-    pthread_attr_init(&attr);
-    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-    pthread_create(&p, 0, poll, &glob);
-    pthread_attr_destroy(&attr);
-    printf("glob poller is started");
-  }
-} global_poller;
-
-int main() {
-  printf("%p %p\n", glob, glob2);
-  return 0;
-}
-
-#else // CONFIG1
-
-void *bar(void *input, bool sleep_before_init);
-void *glob2 = bar((void*)0x2345, true);
-
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc (removed)
@@ -1,29 +0,0 @@
-// Check that memset() call from a shared library gets intercepted.
-
-// RUN: %clangxx_asan -O0 %s -DSHARED_LIB \
-// RUN:     -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -O0 %s -o %t %ld_flags_rpath_exe && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-// XFAIL: i386-netbsd
-
-#include <stdio.h>
-#include <string.h>
-
-#if defined(SHARED_LIB)
-extern "C"
-void my_memset(void *p, size_t sz) {
-  memset(p, 0, sz);
-}
-#else
-extern "C" void my_memset(void *p, size_t sz);
-
-int main(int argc, char *argv[]) {
-  char buf[10];
-  my_memset(buf, 11);
-  // CHECK: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
-  // CHECK: {{WRITE of size 11 at 0x.* thread T0}}
-  // CHECK: {{0x.* in my_memset .*interception-in-shared-lib-test.cc:}}[[@LINE-10]]
-  return 0;
-}
-#endif

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp Mon Aug  5 09:48:12 2019
@@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
   my_memset(buf, 11);
   // CHECK: {{.*ERROR: AddressSanitizer: stack-buffer-overflow}}
   // CHECK: {{WRITE of size 11 at 0x.* thread T0}}
-  // CHECK: {{0x.* in my_memset .*interception-in-shared-lib-test.cc:}}[[@LINE-10]]
+  // CHECK: {{0x.* in my_memset .*interception-in-shared-lib-test.cpp:}}[[@LINE-10]]
   return 0;
 }
 #endif

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc (removed)
@@ -1,57 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -pthread -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2 %run %t a 2>&1 | FileCheck %s -check-prefix=OK -allow-empty
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2 not %run %t b 2>&1 | FileCheck %s -check-prefix=B
-
-// pthread barriers are not available on OS X
-// UNSUPPORTED: darwin
-
-#include <assert.h>
-#include <pthread.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-char *pointers[2];
-pthread_barrier_t bar;
-
-void *thread_main(void *n) {
-  char local;
-
-  unsigned long id = (unsigned long)n;
-  pointers[id] = &local;
-  pthread_barrier_wait(&bar);
-  pthread_barrier_wait(&bar);
-
-  return NULL;
-}
-
-int main(int argc, char **argv) {
-  assert(argc >= 2);
-
-  char t = argv[1][0];
-
-  pthread_t threads[2];
-  pthread_barrier_init(&bar, NULL, 3);
-  pthread_create(&threads[0], 0, thread_main, (void *)0);
-  pthread_create(&threads[1], 0, thread_main, (void *)1);
-  pthread_barrier_wait(&bar);
-
-  if (t == 'a') {
-    // OK-NOT: not handled yet
-    unsigned r = pointers[0] - pointers[1];
-  } else {
-    char local;
-    char *parent_pointer = &local;
-
-    // B: ERROR: AddressSanitizer: invalid-pointer-pair
-    // B: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-threads.cc:[[@LINE+1]]
-    unsigned r = parent_pointer - pointers[0];
-  }
-
-  pthread_barrier_wait(&bar);
-  pthread_join(threads[0], 0);
-  pthread_join(threads[1], 0);
-  pthread_barrier_destroy(&bar);
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/invalid-pointer-pairs-threads.cpp Mon Aug  5 09:48:12 2019
@@ -44,7 +44,7 @@ int main(int argc, char **argv) {
     char *parent_pointer = &local;
 
     // B: ERROR: AddressSanitizer: invalid-pointer-pair
-    // B: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-threads.cc:[[@LINE+1]]
+    // B: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-threads.cpp:[[@LINE+1]]
     unsigned r = parent_pointer - pointers[0];
   }
 

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc (removed)
@@ -1,28 +0,0 @@
-// RUN: %clangxx_asan -O0 -g %s -o %t && %env_asan_opts=handle_ioctl=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 -g %s -o %t && %env_asan_opts=handle_ioctl=1 not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -O0 -g %s -o %t && %run %t
-// RUN: %clangxx_asan -O3 -g %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <unistd.h>
-
-#if defined(__sun__) && defined(__svr4__)
-#include <sys/filio.h>
-#endif
-
-int main(int argc, char **argv) {
-  int fd = socket(AF_INET, SOCK_DGRAM, 0);
-
-  int nonblock;
-  int res = ioctl(fd, FIONBIO, &nonblock + 1);
-  // CHECK: AddressSanitizer: stack-buffer-overflow
-  // CHECK: READ of size 4 at
-  // CHECK: {{#.* in main .*ioctl.cc:}}[[@LINE-3]]
-  assert(res == 0);
-  close(fd);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/ioctl.cpp Mon Aug  5 09:48:12 2019
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
   int res = ioctl(fd, FIONBIO, &nonblock + 1);
   // CHECK: AddressSanitizer: stack-buffer-overflow
   // CHECK: READ of size 4 at
-  // CHECK: {{#.* in main .*ioctl.cc:}}[[@LINE-3]]
+  // CHECK: {{#.* in main .*ioctl.cpp:}}[[@LINE-3]]
   assert(res == 0);
   close(fd);
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc (removed)
@@ -1,39 +0,0 @@
-// Test that LargeAllocator unpoisons memory before releasing it to the OS.
-// RUN: %clangxx_asan %s -o %t
-// The memory is released only when the deallocated chunk leaves the quarantine,
-// otherwise the mmap(p, ...) call overwrites the malloc header.
-// RUN: %env_asan_opts=quarantine_size_mb=0 %run %t
-
-#include <assert.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef __ANDROID__
-#include <malloc.h>
-void *my_memalign(size_t boundary, size_t size) {
-  return memalign(boundary, size);
-}
-#else
-void *my_memalign(size_t boundary, size_t size) {
-  void *p;
-  posix_memalign(&p, boundary, size);
-  return p;
-}
-#endif
-
-int main() {
-  const long kPageSize = sysconf(_SC_PAGESIZE);
-  void *p = my_memalign(kPageSize, 1024 * 1024);
-  free(p);
-
-  char *q = (char *)mmap(p, kPageSize, PROT_READ | PROT_WRITE,
-                         MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
-  assert(q == p);
-
-  memset(q, 42, kPageSize);
-
-  munmap(q, kPageSize);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/lto-constmerge-odr.cc (removed)
@@ -1,14 +0,0 @@
-// RUN: %clangxx_asan -O3 -flto %s -o %t
-// RUN: %run %t 2>&1
-
-// REQUIRES: lto
-
-int main(int argc, const char * argv[]) {
-  struct { long width, height; } a = {16, 16};
-  struct { long width, height; } b = {16, 16};
-
-  // Just to make sure 'a' and 'b' don't get optimized out.
-  asm volatile("" : : "r" (&a), "r" (&b));
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc (removed)
@@ -1,35 +0,0 @@
-// Test the mmap_limit_mb flag.
-//
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %run %t 20 16
-// RUN: %run %t 30 1000000
-// RUN: %env_asan_opts=mmap_limit_mb=300 %run %t 20 16
-// RUN: %env_asan_opts=mmap_limit_mb=300 %run %t 20 1000000
-// RUN: %env_asan_opts=mmap_limit_mb=300 not %run %t 500 16 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=mmap_limit_mb=300 not %run %t 500 1000000 2>&1 | FileCheck %s
-//
-// FIXME: Windows doesn't implement mmap_limit_mb.
-// XFAIL: windows-msvc
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <algorithm>
-#include <vector>
-
-int main(int argc, char **argv) {
-  assert(argc == 3);
-  long total_mb = atoi(argv[1]);
-  long allocation_size = atoi(argv[2]);
-  fprintf(stderr, "total_mb: %zd allocation_size: %zd\n", total_mb,
-          allocation_size);
-  std::vector<char *> v;
-  for (long total = total_mb << 20; total > 0; total -= allocation_size)
-    v.push_back(new char[allocation_size]);
-  for (std::vector<char *>::const_iterator it = v.begin(); it != v.end(); ++it)
-    delete[](*it);
-  fprintf(stderr, "PASS\n");
-  // CHECK: total_mmaped{{.*}}mmap_limit_mb
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc (removed)
@@ -1,27 +0,0 @@
-// REQUIRES: asan-64-bits
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN:                                    not %run %t 2>&1  | FileCheck %s
-// RUN: %env_asan_opts=poison_array_cookie=1 not %run %t 2>&1  | FileCheck %s
-// RUN: %env_asan_opts=poison_array_cookie=0 not %run %t 2>&1  | FileCheck %s --check-prefix=NO_COOKIE
-
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <stdlib.h>
-struct C {
-  int x;
-  ~C() {
-    fprintf(stderr, "ZZZZZZZZ\n");
-    exit(1);
-  }
-};
-
-int main(int argc, char **argv) {
-  C *buffer = new C[argc];
-  buffer[-2].x = 10;
-// CHECK: AddressSanitizer: heap-buffer-overflow
-// CHECK: in main {{.*}}new_array_cookie_test.cc:[[@LINE-2]]
-// CHECK: is located 0 bytes inside of 12-byte region
-// NO_COOKIE: ZZZZZZZZ
-  delete [] buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_test.cpp Mon Aug  5 09:48:12 2019
@@ -20,7 +20,7 @@ int main(int argc, char **argv) {
   C *buffer = new C[argc];
   buffer[-2].x = 10;
 // CHECK: AddressSanitizer: heap-buffer-overflow
-// CHECK: in main {{.*}}new_array_cookie_test.cc:[[@LINE-2]]
+// CHECK: in main {{.*}}new_array_cookie_test.cpp:[[@LINE-2]]
 // CHECK: is located 0 bytes inside of 12-byte region
 // NO_COOKIE: ZZZZZZZZ
   delete [] buffer;

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc (removed)
@@ -1,41 +0,0 @@
-// REQUIRES: asan-64-bits
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: %env_asan_opts=poison_array_cookie=1 not %run %t 2>&1  | FileCheck %s --check-prefix=COOKIE
-// RUN: %env_asan_opts=poison_array_cookie=0 not %run %t 2>&1  | FileCheck %s --check-prefix=NO_COOKIE
-
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-int dtor_counter;
-struct C {
-  int x;
-  ~C() {
-    dtor_counter++;
-    fprintf(stderr, "DTOR %d\n", dtor_counter);
-  }
-};
-
-__attribute__((noinline)) void Delete(C *c) { delete[] c; }
-__attribute__((no_sanitize_address)) void Write42ToCookie(C *c) {
-  long *p = reinterpret_cast<long*>(c);
-  p[-1] = 42;
-}
-
-int main(int argc, char **argv) {
-  C *buffer = new C[argc];
-  delete [] buffer;
-  Write42ToCookie(buffer);
-  delete [] buffer;
-// COOKIE: DTOR 1
-// COOKIE-NOT: DTOR 2
-// COOKIE: AddressSanitizer: loaded array cookie from free-d memory
-// COOKIE: AddressSanitizer: attempting double-free
-// NO_COOKIE: DTOR 1
-// NO_COOKIE: DTOR 43
-// NO_COOKIE-NOT: DTOR 44
-// NO_COOKIE-NOT: AddressSanitizer: loaded array cookie from free-d memory
-// NO_COOKIE: AddressSanitizer: attempting double-free
-
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/new_array_cookie_with_new_from_class.cc (removed)
@@ -1,40 +0,0 @@
-// Test that we do not poison the array cookie if the operator new is defined
-// inside the class.
-// RUN: %clangxx_asan  %s -o %t && %run %t
-//
-// XFAIL: arm
-
-// UNSUPPORTED: ios
-
-#include <new>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <assert.h>
-struct Foo {
-  void *operator new(size_t s) { return Allocate(s); }
-  void *operator new[] (size_t s) { return Allocate(s); }
-  ~Foo();
-  static void *allocated;
-  static void *Allocate(size_t s) {
-    assert(!allocated);
-    return allocated = ::new char[s];
-  }
-};
-
-Foo::~Foo() {}
-void *Foo::allocated;
-
-Foo *getFoo(size_t n) {
-  return new Foo[n];
-}
-
-int main() {
-  Foo *foo = getFoo(10);
-  fprintf(stderr, "foo  : %p\n", foo);
-  fprintf(stderr, "alloc: %p\n", Foo::allocated);
-  assert(reinterpret_cast<uintptr_t>(foo) ==
-         reinterpret_cast<uintptr_t>(Foo::allocated) + sizeof(void*));
-  *reinterpret_cast<uintptr_t*>(Foo::allocated) = 42;
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/no-fd.cc (removed)
@@ -1,43 +0,0 @@
-// RUN: %clangxx_asan -std=c++11 -O0 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=debug=1,verbosity=2 %run %t 2>&1 | FileCheck %s
-
-// Test ASan initialization
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-extern "C" const char *__asan_default_options() {
-  return "test_only_emulate_no_memorymap=1";
-}
-
-void parent(int argc, char **argv) {
-  fprintf(stderr, "hello\n");
-  // CHECK: hello
-  close(0);
-  close(1);
-  dup2(2, 3);
-  close(2);
-  char *const newargv[] = {argv[0], (char *)"x", nullptr};
-  execv(argv[0], newargv);
-  perror("execve");
-  exit(1);
-}
-
-void child() {
-  assert(dup(3) == 0);
-  assert(dup(3) == 1);
-  assert(dup(3) == 2);
-  fprintf(stderr, "world\n");
-  // CHECK: world
-}
-
-int main(int argc, char **argv) {
-  if (argc == 1) {
-    parent(argc, argv);
-  } else {
-    child();
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/print_cmdline.cc (removed)
@@ -1,18 +0,0 @@
-// Check that ASan can print reproducer cmdline for failed binary if desired.
-//
-// RUN: %clang_asan %s -o %t-exe
-//
-// RUN: env not %run %t-exe 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=print_cmdline=false not %run %t-exe 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=print_cmdline=true not %run %t-exe first second/third [fourth] 2>&1 | FileCheck %s --check-prefix CHECK-PRINT
-
-volatile int ten = 10;
-
-int main() {
-  char x[10];
-  // CHECK-NOT: Command:
-  // CHECK-PRINT: {{Command: .*-exe first second/third \[fourth\]}}
-  x[ten] = 1; // BOOM
-  return  0;
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/readv.cc (removed)
@@ -1,32 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-// RUN: %clangxx_asan -O0 %s -DPOSITIVE -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Test the readv() interceptor.
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/uio.h>
-#include <time.h>
-
-int main() {
-  char buf[2011];
-  struct iovec iov[2];
-#ifdef POSITIVE
-  char * volatile buf_ = buf;
-  iov[0].iov_base = buf_ - 1;
-#else
-  iov[0].iov_base = buf + 1;
-#endif
-  iov[0].iov_len = 5;
-  iov[1].iov_base = buf + 10;
-  iov[1].iov_len = 2000;
-  int fd = open("/etc/hosts", O_RDONLY);
-  assert(fd > 0);
-  readv(fd, iov, 2);
-  // CHECK: WRITE of size 5 at
-  close(fd);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc (removed)
@@ -1,56 +0,0 @@
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O1 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O2 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O3 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-
-#if !defined(SHARED_LIB)
-#include <dlfcn.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <string>
-
-using std::string;
-
-typedef void (fun_t)(int x);
-
-int main(int argc, char *argv[]) {
-  string path = string(argv[0]) + "-so.so";
-  printf("opening %s ... \n", path.c_str());
-  void *lib = dlopen(path.c_str(), RTLD_NOW);
-  if (!lib) {
-    printf("error in dlopen(): %s\n", dlerror());
-    return 1;
-  }
-  fun_t *inc = (fun_t*)dlsym(lib, "inc");
-  if (!inc) return 1;
-  printf("ok\n");
-  inc(1);
-  inc(-1);  // BOOM
-  // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.*}}
-  // CHECK: {{    #1 0x.* in main .*shared-lib-test.cc:}}[[@LINE-4]]
-  return 0;
-}
-#else  // SHARED_LIB
-#include <stdio.h>
-#include <string.h>
-
-int pad[10];
-int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-extern "C"
-void inc(int index) {
-  GLOB[index]++;
-}
-
-extern "C"
-void inc2(int *a, int index) {
-  a[index]++;
-}
-#endif  // SHARED_LIB

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cpp Mon Aug  5 09:48:12 2019
@@ -34,7 +34,7 @@ int main(int argc, char *argv[]) {
   // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}
   // CHECK: {{READ of size 4 at 0x.* thread T0}}
   // CHECK: {{    #0 0x.*}}
-  // CHECK: {{    #1 0x.* in main .*shared-lib-test.cc:}}[[@LINE-4]]
+  // CHECK: {{    #1 0x.* in main .*shared-lib-test.cpp:}}[[@LINE-4]]
   return 0;
 }
 #else  // SHARED_LIB

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/stack-overflow.cc (removed)
@@ -1,116 +0,0 @@
-// Test ASan detection of stack-overflow condition.
-
-// RUN: %clangxx_asan -O0 %s -DSMALL_FRAME -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DTHREAD -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -pthread -o %t && %env_asan_opts=use_sigaltstack=1 not %run %t 2>&1 | FileCheck %s
-// RUN: not %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-
-// UNSUPPORTED: ios
-
-#include <assert.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sanitizer/asan_interface.h>
-
-const int BS = 1024;
-volatile char x;
-volatile int y = 1;
-volatile int z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11, z12, z13;
-
-void recursive_func(char *p) {
-#if defined(SMALL_FRAME)
-  char *buf = 0;
-#elif defined(SAVE_ALL_THE_REGISTERS)
-  char *buf = 0;
-  int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13;
-  t0 = z0;
-  t1 = z1;
-  t2 = z2;
-  t3 = z3;
-  t4 = z4;
-  t5 = z5;
-  t6 = z6;
-  t7 = z7;
-  t8 = z8;
-  t9 = z9;
-  t10 = z10;
-  t11 = z11;
-  t12 = z12;
-  t13 = z13;
-
-  z0 = t0;
-  z1 = t1;
-  z2 = t2;
-  z3 = t3;
-  z4 = t4;
-  z5 = t5;
-  z6 = t6;
-  z7 = t7;
-  z8 = t8;
-  z9 = t9;
-  z10 = t10;
-  z11 = t11;
-  z12 = t12;
-  z13 = t13;
-#else
-  char buf[BS];
-  // Check that the stack grows in the righ direction, unless we use fake stack.
-  if (p && !__asan_get_current_fake_stack())
-    assert(p - buf >= BS);
-  buf[rand() % BS] = 1;
-  buf[rand() % BS] = 2;
-  x = buf[rand() % BS];
-#endif
-  if (y)
-    recursive_func(buf);
-  x = 1; // prevent tail call optimization
-  // CHECK: {{stack-overflow on address 0x.* \(pc 0x.* bp 0x.* sp 0x.* T.*\)}}
-  // If stack overflow happens during function prologue, stack trace may be
-  // corrupted. Unwind tables are not always 100% exact there.
-  // For this reason, we don't do any further checks.
-}
-
-void *ThreadFn(void* unused) {
-  recursive_func(0);
-  return 0;
-}
-
-void LimitStackAndReexec(int argc, char **argv) {
-  struct rlimit rlim;
-  int res = getrlimit(RLIMIT_STACK, &rlim);
-  assert(res == 0);
-  if (rlim.rlim_cur == RLIM_INFINITY) {
-    rlim.rlim_cur = 256 * 1024;
-    res = setrlimit(RLIMIT_STACK, &rlim);
-    assert(res == 0);
-
-    execv(argv[0], argv);
-    assert(0 && "unreachable");
-  }
-}
-
-int main(int argc, char **argv) {
-  LimitStackAndReexec(argc, argv);
-#ifdef THREAD
-  pthread_t t;
-  pthread_create(&t, 0, ThreadFn, 0);
-  pthread_join(t, 0);
-#else
-  recursive_func(0);
-#endif
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc (removed)
@@ -1,114 +0,0 @@
-// RUN: %clangxx_asan  -O0 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O1 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O2 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O3 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t
-// Regression test for a CHECK failure with small stack size and large frame.
-// RUN: %clangxx_asan  -O3 %s -pthread -o %t -DkSize=10000 -DUseThread -DkStackSize=131072 && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck --check-prefix=THREAD %s
-//
-// Test that we can find UAR in a thread other than main:
-// RUN: %clangxx_asan  -DUseThread -O2 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck --check-prefix=THREAD %s
-//
-// Test the max_uar_stack_size_log/min_uar_stack_size_log flag.
-//
-// RUN: %env_asan_opts=detect_stack_use_after_return=1:max_uar_stack_size_log=20:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-20 %s
-// RUN: %env_asan_opts=detect_stack_use_after_return=1:min_uar_stack_size_log=24:max_uar_stack_size_log=24:verbosity=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-24 %s
-
-// This test runs out of stack on AArch64.
-// UNSUPPORTED: aarch64
-// stack size log lower than expected
-// XFAIL: freebsd,netbsd
-
-// FIXME: Fix this test for dynamic runtime on arm linux.
-// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
-
-#include <limits.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef kSize
-# define kSize 1
-#endif
-
-#ifndef UseThread
-# define UseThread 0
-#endif
-
-#ifndef kStackSize
-# define kStackSize 0
-#endif
-
-__attribute__((noinline))
-char *Ident(char *x) {
-  fprintf(stderr, "1: %p\n", x);
-  return x;
-}
-
-__attribute__((noinline))
-char *Func1() {
-  char local[kSize];
-  return Ident(local);
-}
-
-__attribute__((noinline))
-void Func2(char *x) {
-  fprintf(stderr, "2: %p\n", x);
-  *x = 1;
-  // CHECK: WRITE of size 1 {{.*}} thread T0
-  // CHECK:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-2]]
-  // CHECK: is located in stack of thread T0 at offset
-  // CHECK: 'local'{{.*}} <== Memory access at offset {{16|32}} is inside this variable
-  // THREAD: WRITE of size 1 {{.*}} thread T{{[1-9]}}
-  // THREAD:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-6]]
-  // THREAD: is located in stack of thread T{{[1-9]}} at offset
-  // THREAD: 'local'{{.*}} <== Memory access at offset {{16|32}} is inside this variable
-  // CHECK-20: T0: FakeStack created:{{.*}} stack_size_log: 20
-  // CHECK-24: T0: FakeStack created:{{.*}} stack_size_log: 24
-}
-
-void *Thread(void *unused)  {
-  Func2(Func1());
-  return NULL;
-}
-
-int main(int argc, char **argv) {
-#if UseThread
-  pthread_attr_t attr;
-  pthread_attr_init(&attr);
-  if (kStackSize > 0) {
-    size_t desired_stack_size = kStackSize;
-#ifdef PTHREAD_STACK_MIN
-    if (desired_stack_size < PTHREAD_STACK_MIN) {
-      desired_stack_size = PTHREAD_STACK_MIN;
-    }
-#endif
-
-    int ret = pthread_attr_setstacksize(&attr, desired_stack_size);
-    if (ret != 0) {
-      fprintf(stderr, "pthread_attr_setstacksize returned %d\n", ret);
-      abort();
-    }
-    
-    size_t stacksize_check;
-    ret = pthread_attr_getstacksize(&attr, &stacksize_check);
-    if (ret != 0) {
-      fprintf(stderr, "pthread_attr_getstacksize returned %d\n", ret);
-      abort();
-    }
-
-    if (stacksize_check != desired_stack_size) {
-      fprintf(stderr, "Unable to set stack size to %d, the stack size is %d.\n",
-              (int)desired_stack_size, (int)stacksize_check);
-      abort(); 
-    }
-  }
-  pthread_t t;
-  pthread_create(&t, &attr, Thread, 0);
-  pthread_attr_destroy(&attr);
-  pthread_join(t, 0);
-#else
-  Func2(Func1());
-#endif
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cpp Mon Aug  5 09:48:12 2019
@@ -56,11 +56,11 @@ void Func2(char *x) {
   fprintf(stderr, "2: %p\n", x);
   *x = 1;
   // CHECK: WRITE of size 1 {{.*}} thread T0
-  // CHECK:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-2]]
+  // CHECK:     #0{{.*}}Func2{{.*}}stack-use-after-return.cpp:[[@LINE-2]]
   // CHECK: is located in stack of thread T0 at offset
   // CHECK: 'local'{{.*}} <== Memory access at offset {{16|32}} is inside this variable
   // THREAD: WRITE of size 1 {{.*}} thread T{{[1-9]}}
-  // THREAD:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-6]]
+  // THREAD:     #0{{.*}}Func2{{.*}}stack-use-after-return.cpp:[[@LINE-6]]
   // THREAD: is located in stack of thread T{{[1-9]}} at offset
   // THREAD: 'local'{{.*}} <== Memory access at offset {{16|32}} is inside this variable
   // CHECK-20: T0: FakeStack created:{{.*}} stack_size_log: 20

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc (removed)
@@ -1,145 +0,0 @@
-// Test for ASAN_OPTIONS=start_deactivated=1 mode.
-// Main executable is uninstrumented, but linked to ASan runtime. The shared
-// library is instrumented. Memory errors before dlopen are not detected.
-
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s -std=c++11 -fPIC -shared -o %t-so.so
-// RUN: %clangxx -O0 %s -std=c++11 -c -o %t.o
-// RUN: %clangxx_asan -O0 %t.o %libdl -o %t
-// RUN: %env_asan_opts=start_deactivated=1,allocator_may_return_null=0 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=allocator_may_return_null=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=help=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-HELP
-// RUN: %env_asan_opts=start_deactivated=1,verbosity=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED-V0
-
-// Check that verbosity=1 in activation flags affects reporting of unrecognized activation flags.
-// RUN: %env_asan_opts=start_deactivated=1 \
-// RUN:   ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0,verbosity=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
-
-
-// END.
-
-#if !defined(SHARED_LIB)
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <string>
-
-#include "sanitizer/asan_interface.h"
-
-void test_malloc_shadow(char *p, size_t sz, bool expect_redzones) {
-  // Last byte of the left redzone, if present.
-  assert((char *)__asan_region_is_poisoned(p - 1, sz + 1) ==
-         (expect_redzones ? p - 1 : nullptr));
-  // The user memory.
-  assert((char *)__asan_region_is_poisoned(p, sz) == nullptr);
-  // First byte of the right redzone, if present.
-  assert((char *)__asan_region_is_poisoned(p, sz + 1) ==
-         (expect_redzones ? p + sz : nullptr));
-}
-
-typedef void (*Fn)();
-
-int main(int argc, char *argv[]) {
-  constexpr unsigned nPtrs = 200;
-  char *ptrs[nPtrs];
-
-  // Before activation: no redzones.
-  for (size_t sz = 1; sz < nPtrs; ++sz) {
-    ptrs[sz] = (char *)malloc(sz);
-    test_malloc_shadow(ptrs[sz], sz, false);
-  }
-
-  // Create a honey pot for the future, instrumented, allocations. Since the
-  // quarantine is disabled, chunks are going to be recycled right away and
-  // reused for the new allocations. New allocations must get the proper
-  // redzones anyway, whether it's a fresh or reused allocation.
-  constexpr size_t HoneyPotBlockSize = 4096;
-  constexpr int HoneyPotSize = 200;
-  char *honeyPot[HoneyPotSize];
-  for (int i = 1; i < HoneyPotSize; ++i) {
-    honeyPot[i] = (char *)malloc(HoneyPotBlockSize);
-    test_malloc_shadow(honeyPot[i], HoneyPotBlockSize, false);
-  }
-  for (int i = 1; i < HoneyPotSize; ++i)
-    free(honeyPot[i]);
-
-  std::string path = std::string(argv[0]) + "-so.so";
-  void *dso = dlopen(path.c_str(), RTLD_NOW);
-  if (!dso) {
-    fprintf(stderr, "dlopen failed: %s\n", dlerror());
-    return 1;
-  }
-
-  // After this line ASan is activated and starts detecting errors.
-  void *fn = dlsym(dso, "do_another_bad_thing");
-  if (!fn) {
-    fprintf(stderr, "dlsym failed: %s\n", dlerror());
-    return 1;
-  }
-
-  // After activation: redzones.
-  for (int i = 1; i < HoneyPotSize; ++i) {
-    honeyPot[i] = (char *)malloc(HoneyPotBlockSize);
-    test_malloc_shadow(honeyPot[i], HoneyPotBlockSize, true);
-  }
-  {
-    char *p = (char *)malloc(HoneyPotBlockSize);
-    test_malloc_shadow(p, HoneyPotBlockSize, true);
-    free(p);
-  }
-  for (int i = 1; i < HoneyPotSize; ++i)
-    free(honeyPot[i]);
-
-  // Pre-existing allocations got redzones, too.
-  for (size_t sz = 1; sz < nPtrs; ++sz) {
-    test_malloc_shadow(ptrs[sz], sz, true);
-    free(ptrs[sz]);
-  }
-
-  // Test that ASAN_ACTIVATION_OPTIONS=allocator_may_return_null=1 has effect.
-  void *p = malloc((unsigned long)-2);
-  assert(!p);
-  // CHECK: WARNING: AddressSanitizer failed to allocate 0xfff{{.*}} bytes
-
-  ((Fn)fn)();
-  // CHECK: AddressSanitizer: heap-buffer-overflow
-  // CHECK: READ of size 1
-  // CHECK: {{#0 .* in do_another_bad_thing}}
-  // CHECK: is located 5 bytes to the right of 100-byte region
-  // CHECK: in do_another_bad_thing
-
-  return 0;
-}
-
-#else  // SHARED_LIB
-
-#include <stdio.h>
-#include <stdlib.h>
-
-extern "C" void do_another_bad_thing() {
-  char *volatile p = (char *)malloc(100);
-  printf("%hhx\n", p[105]);
-}
-
-#endif  // SHARED_LIB
-
-// help=1 in activation flags lists only flags are are supported at activation
-// CHECK-HELP: Available flags for {{.*}}Sanitizer:
-// CHECK-HELP-NOT: handle_segv
-// CHECK-HELP: max_redzone
-// CHECK-HELP-NOT: handle_segv
-
-// unsupported activation flags produce a warning ...
-// CHECK-UNSUPPORTED: WARNING: found 1 unrecognized
-// CHECK-UNSUPPORTED:   handle_segv
-
-// ... but not at verbosity=0
-// CHECK-UNSUPPORTED-V0-NOT: WARNING: found {{.*}} unrecognized

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strerror_r_test.cc (removed)
@@ -1,14 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-
-// Regression test for PR17138.
-
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-
-int main() {
-  char buf[1024];
-  char *res = (char *)strerror_r(300, buf, sizeof(buf));
-  printf("%p\n", res);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// When built as C on Linux, strndup is transformed to __strndup.
-// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: windows-msvc,s390,arm && !fast-unwinder-works
-
-#include <string.h>
-
-char kString[] = "foo";
-
-int main(int argc, char **argv) {
-  char *copy = strndup(kString, 2);
-  int x = copy[2 + argc];  // BOOM
-  // CHECK: AddressSanitizer: heap-buffer-overflow
-  // CHECK: #0 {{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-2]]
-  // CHECK-LABEL: allocated by thread T{{.*}} here:
-  // CHECK: #{{[01]}} {{.*}}strndup
-  // CHECK: #{{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-6]]
-  // CHECK-LABEL: SUMMARY
-  // CHECK: strndup_oob_test.cc:[[@LINE-7]]
-  return x;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cpp Mon Aug  5 09:48:12 2019
@@ -17,11 +17,11 @@ int main(int argc, char **argv) {
   char *copy = strndup(kString, 2);
   int x = copy[2 + argc];  // BOOM
   // CHECK: AddressSanitizer: heap-buffer-overflow
-  // CHECK: #0 {{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-2]]
+  // CHECK: #0 {{.*}}main {{.*}}strndup_oob_test.cpp:[[@LINE-2]]
   // CHECK-LABEL: allocated by thread T{{.*}} here:
   // CHECK: #{{[01]}} {{.*}}strndup
-  // CHECK: #{{.*}}main {{.*}}strndup_oob_test.cc:[[@LINE-6]]
+  // CHECK: #{{.*}}main {{.*}}strndup_oob_test.cpp:[[@LINE-6]]
   // CHECK-LABEL: SUMMARY
-  // CHECK: strndup_oob_test.cc:[[@LINE-7]]
+  // CHECK: strndup_oob_test.cpp:[[@LINE-7]]
   return x;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clang_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clang_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// When built as C on Linux, strndup is transformed to __strndup.
-// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: windows-msvc,s390,arm && !fast-unwinder-works
-
-#include <string.h>
-
-char kChars[] = { 'f', 'o', 'o' };
-
-int main(int argc, char **argv) {
-  char *copy = strndup(kChars, 3);
-  copy = strndup(kChars, 10);
-  // CHECK: AddressSanitizer: global-buffer-overflow
-  // CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]]
-  return *copy;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cpp Mon Aug  5 09:48:12 2019
@@ -17,6 +17,6 @@ int main(int argc, char **argv) {
   char *copy = strndup(kChars, 3);
   copy = strndup(kChars, 10);
   // CHECK: AddressSanitizer: global-buffer-overflow
-  // CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]]
+  // CHECK: {{.*}}main {{.*}}.cpp:[[@LINE-2]]
   return *copy;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/tsd_dtor_leak.cc (removed)
@@ -1,42 +0,0 @@
-// Regression test for a leak in tsd:
-// https://code.google.com/p/address-sanitizer/issues/detail?id=233
-// RUN: %clangxx_asan -O1 %s -pthread -o %t
-// RUN: %env_asan_opts=quarantine_size_mb=0 %run %t
-// XFAIL: x86_64-netbsd
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <sanitizer/allocator_interface.h>
-
-static pthread_key_t tsd_key;
-
-void *Thread(void *) {
-  pthread_setspecific(tsd_key, malloc(10));
-  return 0;
-}
-
-static volatile void *v;
-
-void Dtor(void *tsd) {
-  v = malloc(10000);
-  free(tsd);
-  free((void*)v);  // The bug was that this was leaking.
-}
-
-int main() {
-  assert(0 == pthread_key_create(&tsd_key, Dtor));
-  pthread_t t;
-  for (int i = 0; i < 3; i++) {
-    pthread_create(&t, 0, Thread, 0);
-    pthread_join(t, 0);
-  }
-  size_t old_heap_size = __sanitizer_get_heap_size();
-  for (int i = 0; i < 10; i++) {
-    pthread_create(&t, 0, Thread, 0);
-    pthread_join(t, 0);
-    size_t new_heap_size = __sanitizer_get_heap_size();
-    fprintf(stderr, "heap size: new: %zd old: %zd\n", new_heap_size, old_heap_size);
-    assert(old_heap_size == new_heap_size);
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clangxx_asan -DWAIT -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAIT -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -DWAITPID -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAITPID -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: darwin
-
-#include <assert.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-int main(int argc, char **argv) {
-  pid_t pid = fork();
-  if (pid) { // parent
-    int x[3];
-    int *status = x + argc * 3;
-    int res;
-#if defined(WAIT)
-    res = wait(status);
-#elif defined(WAITPID)
-    res = waitpid(pid, status, WNOHANG);
-#endif
-    // CHECK: stack-buffer-overflow
-    // CHECK: {{WRITE of size .* at 0x.* thread T0}}
-    // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait.cc:}}
-    // CHECK: is located in stack of thread T0 at offset
-    // CHECK: {{in main}}
-    return res == -1 ? 1 : 0;
-  }
-  // child
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/wait.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/wait.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait.cpp Mon Aug  5 09:48:12 2019
@@ -24,7 +24,7 @@ int main(int argc, char **argv) {
     // CHECK: stack-buffer-overflow
     // CHECK: {{WRITE of size .* at 0x.* thread T0}}
     // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait.cc:}}
+    // CHECK: {{in main .*wait.cpp:}}
     // CHECK: is located in stack of thread T0 at offset
     // CHECK: {{in main}}
     return res == -1 ? 1 : 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc (removed)
@@ -1,36 +0,0 @@
-// RUN: %clangxx_asan -DWAIT3 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3 -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: android,darwin
-
-#include <assert.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-int main(int argc, char **argv) {
-  pid_t pid = fork();
-  if (pid) { // parent
-    int x[3];
-    int *status = x + argc * 3;
-    int res;
-#if defined(WAIT3)
-    res = wait3(status, WNOHANG, NULL);
-#elif defined(WAIT3_RUSAGE)
-    struct rusage *ru = (struct rusage*)(x + argc * 3);
-    int good_status;
-    res = wait3(&good_status, WNOHANG, ru);
-#endif
-    // CHECK: stack-buffer-overflow
-    // CHECK: {{WRITE of size .* at 0x.* thread T0}}
-    // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait3.cc:}}
-    // CHECK: is located in stack of thread T0 at offset
-    // CHECK: {{in main}}
-    return res == -1 ? 1 : 0;
-  }
-  // child
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait3.cpp Mon Aug  5 09:48:12 2019
@@ -26,7 +26,7 @@ int main(int argc, char **argv) {
     // CHECK: stack-buffer-overflow
     // CHECK: {{WRITE of size .* at 0x.* thread T0}}
     // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait3.cc:}}
+    // CHECK: {{in main .*wait3.cpp:}}
     // CHECK: is located in stack of thread T0 at offset
     // CHECK: {{in main}}
     return res == -1 ? 1 : 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx_asan -DWAIT4 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4 -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// XFAIL: android
-// UNSUPPORTED: darwin
-
-#include <assert.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-int main(int argc, char **argv) {
-  // This test passes on some versions of Android NDK and fails on other.
-  // https://code.google.com/p/memory-sanitizer/issues/detail?id=64
-  // Make it fail unconditionally on Android.
-#ifdef __ANDROID__
-  return 0;
-#endif
-
-  pid_t pid = fork();
-  if (pid) { // parent
-    int x[3];
-    int *status = x + argc * 3;
-    int res;
-#if defined(WAIT4)
-    res = wait4(pid, status, WNOHANG, NULL);
-#elif defined(WAIT4_RUSAGE)
-    struct rusage *ru = (struct rusage*)(x + argc * 3);
-    int good_status;
-    res = wait4(pid, &good_status, WNOHANG, ru);
-#endif
-    // CHECK: stack-buffer-overflow
-    // CHECK: {{WRITE of size .* at 0x.* thread T0}}
-    // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait4.cc:}}
-    // CHECK: is located in stack of thread T0 at offset
-    // CHECK: {{in main}}
-    return res == -1 ? 1 : 0;
-  }
-  // child
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/wait4.cpp Mon Aug  5 09:48:12 2019
@@ -34,7 +34,7 @@ int main(int argc, char **argv) {
     // CHECK: stack-buffer-overflow
     // CHECK: {{WRITE of size .* at 0x.* thread T0}}
     // CHECK: {{in .*wait}}
-    // CHECK: {{in main .*wait4.cc:}}
+    // CHECK: {{in main .*wait4.cpp:}}
     // CHECK: is located in stack of thread T0 at offset
     // CHECK: {{in main}}
     return res == -1 ? 1 : 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// UNSUPPORTED: darwin
-
-#include <assert.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <signal.h>
-
-int main(int argc, char **argv) {
-  pid_t pid = fork();
-  if (pid) { // parent
-    int x[3];
-    int *status = x + argc * 3;
-    int res;
-
-    siginfo_t *si = (siginfo_t*)(x + argc * 3);
-    res = waitid(P_ALL, 0, si, WEXITED | WNOHANG);
-    // CHECK: stack-buffer-overflow
-    // CHECK: {{WRITE of size .* at 0x.* thread T0}}
-    // CHECK: {{in .*waitid}}
-    // CHECK: {{in main .*waitid.cc:}}
-    // CHECK: is located in stack of thread T0 at offset
-    // CHECK: {{in main}}
-    return res != -1;
-  }
-  // child
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/waitid.cpp Mon Aug  5 09:48:12 2019
@@ -20,7 +20,7 @@ int main(int argc, char **argv) {
     // CHECK: stack-buffer-overflow
     // CHECK: {{WRITE of size .* at 0x.* thread T0}}
     // CHECK: {{in .*waitid}}
-    // CHECK: {{in main .*waitid.cc:}}
+    // CHECK: {{in main .*waitid.cpp:}}
     // CHECK: is located in stack of thread T0 at offset
     // CHECK: {{in main}}
     return res != -1;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-#define CHECK_ALIGNED(ptr,alignment) \
-  do { \
-    if (((uintptr_t)(ptr) % (alignment)) != 0) \
-      return __LINE__; \
-    } \
-  while(0)
-
-int main(void) {
-  int *p = (int*)_aligned_malloc(1024 * sizeof(int), 32);
-  CHECK_ALIGNED(p, 32);
-  p[512] = 0;
-  _aligned_free(p);
-
-  p = (int*)_aligned_malloc(128, 128);
-  CHECK_ALIGNED(p, 128);
-  p = (int*)_aligned_realloc(p, 2048 * sizeof(int), 128);
-  CHECK_ALIGNED(p, 128);
-  p[1024] = 0;
-  if (_aligned_msize(p, 128, 0) != 2048 * sizeof(int))
-    return __LINE__;
-  _aligned_free(p);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc (removed)
@@ -1,37 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t | FileCheck %s
-
-#include <malloc.h>
-#include <stdio.h>
-
-int main() {
-  int *p = (int*)malloc(1024 * sizeof(int));
-  p[512] = 0;
-  free(p);
-
-  p = (int*)malloc(128);
-  p = (int*)realloc(p, 2048 * sizeof(int));
-  p[1024] = 0;
-  free(p);
-
-  p = (int*)calloc(16, sizeof(int));
-  if (p[8] != 0)
-    return 1;
-  p[15]++;
-  if (16 * sizeof(int) != _msize(p))
-    return 2;
-  free(p);
-
-  p = new int;
-  *p = 42;
-  delete p;
-
-  p = new int[42];
-  p[15]++;
-  delete [] p;
-
-  printf("All ok\n");
-// CHECK: All ok
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-#include <process.h>
-
-unsigned WINAPI thread_proc(void *) {
-  volatile char stack_buffer[42];
-  for (int i = 0; i < sizeof(stack_buffer); ++i)
-    stack_buffer[i] = 42;
-  return 0;
-}
-
-int main() {
-  HANDLE thr = (HANDLE)_beginthreadex(NULL, 0, thread_proc, NULL, 0, NULL);
-  if (thr == 0)
-    return 1;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 2;
-  CloseHandle(thr);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/bind_io_completion_callback.cc (removed)
@@ -1,61 +0,0 @@
-// Make sure we can throw exceptions from work items executed via
-// BindIoCompletionCallback.
-//
-// RUN: %clangxx_asan %s -o %t.exe
-// RUN: %run %t.exe 2>&1 | FileCheck %s
-
-#include <windows.h>
-#include <stdio.h>
-
-void ThrowAndCatch();
-
-__declspec(noinline)
-void Throw() {
-  fprintf(stderr, "Throw\n");
-// CHECK: Throw
-  throw 1;
-}
-
-void ThrowAndCatch() {
-  int local;
-  try {
-    Throw();
-  } catch(...) {
-    fprintf(stderr, "Catch\n");
-// CHECK: Catch
-  }
-}
-
-char buffer[65536];
-HANDLE done;
-OVERLAPPED ov;
-
-void CALLBACK completion_callback(DWORD error, DWORD bytesRead,
-                                  LPOVERLAPPED pov) {
-  ThrowAndCatch();
-  SetEvent(done);
-}
-
-int main(int argc, char **argv) {
-  done = CreateEvent(0, false, false, "job is done");
-  if (!done)
-    return 1;
-  HANDLE file = CreateFile(
-      argv[0], GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
-      OPEN_EXISTING,
-      FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED,
-      NULL);
-  if (!file)
-    return 2;
-  if (!BindIoCompletionCallback(file, completion_callback, 0))
-    return 3;
-
-  if (!ReadFile(file, buffer, sizeof(buffer), NULL, &ov) &&
-      GetLastError() != ERROR_IO_PENDING)
-    return 4;
-
-  if (WAIT_OBJECT_0 != WaitForSingleObject(done, 10 * 1000))
-    return 5;
-  fprintf(stderr, "Done!\n");
-// CHECK: Done!
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-typedef struct _S {
-  unsigned int bf1:1;
-  unsigned int bf2:2;
-  unsigned int bf3:3;
-  unsigned int bf4:4;
-} S;
-
-int main(void) {
-  S *s = (S*)malloc(sizeof(S));
-  s->bf1 = 1;
-  s->bf2 = 2;
-  s->bf3 = 3;
-  s->bf4 = 4;
-  free(s);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-typedef struct _S {
-  unsigned int bf1:1;
-  unsigned int bf2:2;
-  unsigned int bf3:3;
-  unsigned int bf4:4;
-} S;
-
-void make_access(S *s) {
-  s->bf2 = 2;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: READ of size {{[124]}} at [[ADDR]]
-// CHECK:   {{#0 .* make_access.*bitfield_uaf.cc}}:[[@LINE-3]]
-// CHECK:   {{#1 .* main}}
-}
-
-int main(void) {
-  S *s = (S*)malloc(sizeof(S));
-  free(s);
-// CHECK: [[ADDR]] is located 0 bytes inside of 4-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// CHECK:   {{#0 .* free }}
-// CHECK:   {{#1 .* main .*bitfield_uaf.cc}}:[[@LINE-4]]
-// CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK:   {{#0 .* malloc }}
-// CHECK:   {{#1 .* main .*bitfield_uaf.cc}}:[[@LINE-8]]
-  make_access(s);
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -14,7 +14,7 @@ void make_access(S *s) {
   s->bf2 = 2;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: READ of size {{[124]}} at [[ADDR]]
-// CHECK:   {{#0 .* make_access.*bitfield_uaf.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* make_access.*bitfield_uaf.cpp}}:[[@LINE-3]]
 // CHECK:   {{#1 .* main}}
 }
 
@@ -24,10 +24,10 @@ int main(void) {
 // CHECK: [[ADDR]] is located 0 bytes inside of 4-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // CHECK:   {{#0 .* free }}
-// CHECK:   {{#1 .* main .*bitfield_uaf.cc}}:[[@LINE-4]]
+// CHECK:   {{#1 .* main .*bitfield_uaf.cpp}}:[[@LINE-4]]
 // CHECK-LABEL: previously allocated by thread T0 here:
 // CHECK:   {{#0 .* malloc }}
-// CHECK:   {{#1 .* main .*bitfield_uaf.cc}}:[[@LINE-8]]
+// CHECK:   {{#1 .* main .*bitfield_uaf.cpp}}:[[@LINE-8]]
   make_access(s);
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  int *buffer = (int*)calloc(42, sizeof(int));
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_left_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 4 bytes to the left of 168-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_left_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*calloc_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 4 bytes to the left of 168-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_left_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*calloc_left_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  int *buffer = (int*)calloc(42, sizeof(int));
-  buffer[42] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_right_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 168-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_right_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[42] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_right_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*calloc_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 168-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_right_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*calloc_right_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  int *buffer = (int*)calloc(42, sizeof(int));
-  free(buffer);
-  buffer[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_uaf.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
-// CHECK: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cc}}:[[@LINE-8]]
-// CHECK: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cc}}:[[@LINE-12]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -9,12 +9,12 @@ int main() {
   buffer[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*calloc_uaf.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*calloc_uaf.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
 // CHECK: freed by thread T0 here:
 // CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cpp}}:[[@LINE-8]]
 // CHECK: previously allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* calloc }}
-// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cc}}:[[@LINE-12]]
+// CHECK-NEXT: {{#1 .* main .*calloc_uaf.cpp}}:[[@LINE-12]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/coverage-basic.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: rm -rf %t-dir
-// RUN: mkdir %t-dir && cd %t-dir
-// RUN: %clangxx_asan -fsanitize-coverage=func %s -o test.exe
-// RUN: %env_asan_opts=coverage=1 %run ./test.exe
-//
-// RUN: %sancov print *.sancov | FileCheck %s
-#include <stdio.h>
-
-void foo() { fputs("FOO", stderr); }
-void bar() { fputs("BAR", stderr); }
-
-int main(int argc, char **argv) {
-  if (argc == 2) {
-    foo();
-    bar();
-  } else {
-    bar();
-    foo();
-  }
-}
-
-// CHECK: 0x{{[0-9a-f]*}}
-// CHECK: 0x{{[0-9a-f]*}}
-// CHECK: 0x{{[0-9a-f]*}}
-// CHECK-NOT: 0x{{[0-9a-f]*}}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc (removed)
@@ -1,16 +0,0 @@
-// Test that coverage and MSVC CRT stdio work from a DLL. This ensures that the
-// __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 -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>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  printf("hello world\n");
-  // CHECK: hello world
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cpp Mon Aug  5 09:48:12 2019
@@ -2,7 +2,7 @@
 // __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 -Od %p/dll_host.cc -Fet.exe
+// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/dll_host.cpp -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
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/crash_read_write.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clangxx_asan -std=c++11 -O0 %s -o %t
-// RUN: not %run %t       2>&1 | FileCheck %s --check-prefix=READ
-// RUN: not %run %t write 2>&1 | FileCheck %s --check-prefix=WRITE
-
-#include <windows.h>
-#include <stdio.h>
-
-static volatile int sink;
-__attribute__((noinline)) void Read(int *ptr) { sink = *ptr; }
-__attribute__((noinline)) void Write(int *ptr) { *ptr = 0; }
-int main(int argc, char **argv) {
-  // Writes to shadow are detected as reads from shadow gap (because of how the
-  // shadow mapping works). This is kinda hard to fix. Test a random address in
-  // the application part of the address space.
-  void *volatile p = VirtualAlloc(0, 4096, MEM_COMMIT, PAGE_READONLY);
-  bool ok = VirtualFree(p, 0, MEM_RELEASE);
-  if (!ok) {
-    printf("VirtualFree failed\n");
-    return 0;
-  }
-  if (argc == 1)
-    Read((int *)p);
-  else
-    Write((int *)p);
-}
-// READ: AddressSanitizer: access-violation on unknown address
-// READ: The signal is caused by a READ memory access.
-// WRITE: AddressSanitizer: access-violation on unknown address
-// WRITE: The signal is caused by a WRITE memory access.

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc (removed)
@@ -1,31 +0,0 @@
-// 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
-
-#include <stdio.h>
-
-typedef void (*FPTR)();
-
-// __xi_a and __xi_z are defined in VC/crt/src/crt0dat.c
-// and are located in .CRT$XIA and .CRT$XIZ respectively.
-extern "C" FPTR __xi_a, __xi_z;
-
-int main() {
-  unsigned count = 0;
-
-  // Iterate through CRT initializers.
-  for (FPTR* it = &__xi_a; it < &__xi_z; ++it) {
-    if (*it)
-      count++;
-  }
-
-  printf("Number of nonzero CRT initializers: %u\n", count);
-// CHECK: Number of nonzero CRT initializers
-}
-
-void call_me_maybe() {}
-
-#pragma data_seg(".CRT$XIB")
-// Add an initializer that shouldn't get its own redzone.
-FPTR run_on_startup = call_me_maybe;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/delay_dbghelp.cc (removed)
@@ -1,18 +0,0 @@
-// Build an executable with ASan, then extract the DLLs that it depends on.
-// RUN: %clang_cl_asan %s -Fe%t.exe
-// RUN: llvm-readobj -coff-imports %t.exe | grep Name: | sed -e 's/ *Name: *//' > %t
-//
-// Make sure the binary doesn't depend on dbghelp directly.
-// RUN: not grep dbghelp.dll %t
-//
-// Make sure any clang_rt DLLs it depends on don't depend on dbghelp. In the
-// static build, there won't be any clang_rt DLLs.
-// RUN: not grep cl""ang_rt %t || \
-// RUN:   grep cl""ang_rt %t | xargs which | \
-// RUN:   xargs llvm-readobj -coff-imports | not grep dbghelp.dll %t
-
-extern "C" int puts(const char *);
-
-int main() {
-  puts("main");
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc (removed)
@@ -1,50 +0,0 @@
-// 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
-// symbolized on Windows.
-#include <malloc.h>
-
-namespace foo {
-// A template function in a namespace.
-template<int x>
-void bar(char *p) {
-  *p = x;
-}
-
-// A regular function in a namespace.
-void spam(char *p) {
-  bar<42>(p);
-}
-}
-
-// A multi-argument template with a bool template parameter.
-template<typename T, bool U>
-void baz(T t) {
-  if (U)
-    foo::spam(t);
-}
-
-template<typename T>
-struct A {
-  A(T v) { v_ = v; }
-  ~A();
-  char *v_;
-};
-
-// A destructor of a template class.
-template<>
-A<char*>::~A() {
-  baz<char*, true>(v_);
-}
-
-int main() {
-  char *buffer = (char*)malloc(42);
-  free(buffer);
-  A<char*> a(buffer);
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: foo::bar<42>{{.*}}demangled_names.cc
-// CHECK: foo::spam{{.*}}demangled_names.cc
-// CHECK: baz<char *,1>{{.*}}demangled_names.cc
-// CHECK: A<char *>::~A<char *>{{.*}}demangled_names.cc
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cpp Mon Aug  5 09:48:12 2019
@@ -43,8 +43,8 @@ int main() {
   free(buffer);
   A<char*> a(buffer);
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: foo::bar<42>{{.*}}demangled_names.cc
-// CHECK: foo::spam{{.*}}demangled_names.cc
-// CHECK: baz<char *,1>{{.*}}demangled_names.cc
-// CHECK: A<char *>::~A<char *>{{.*}}demangled_names.cc
+// CHECK: foo::bar<42>{{.*}}demangled_names.cpp
+// CHECK: foo::spam{{.*}}demangled_names.cpp
+// CHECK: baz<char *,1>{{.*}}demangled_names.cpp
+// CHECK: A<char *>::~A<char *>{{.*}}demangled_names.cpp
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc (removed)
@@ -1,34 +0,0 @@
-// 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>
-#include <stdio.h>
-
-#define CHECK_ALIGNED(ptr,alignment) \
-  do { \
-    if (((uintptr_t)(ptr) % (alignment)) != 0) \
-      return __LINE__; \
-    } \
-  while(0)
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  int *p = (int*)_aligned_malloc(1024 * sizeof(int), 32);
-  CHECK_ALIGNED(p, 32);
-  p[512] = 0;
-  _aligned_free(p);
-
-  p = (int*)_aligned_malloc(128, 128);
-  CHECK_ALIGNED(p, 128);
-  p = (int*)_aligned_realloc(p, 2048 * sizeof(int), 128);
-  CHECK_ALIGNED(p, 128);
-  p[1024] = 0;
-  if (_aligned_msize(p, 128, 0) != 2048 * sizeof(int))
-    return __LINE__;
-  _aligned_free(p);
-
-  printf("All ok\n");
-// CHECK: All ok
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: %run %t %t.dll | FileCheck %s
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc (removed)
@@ -1,39 +0,0 @@
-// 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>
-#include <stdio.h>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  int *p = (int*)malloc(1024 * sizeof(int));
-  p[512] = 0;
-  free(p);
-
-  p = (int*)malloc(128);
-  p = (int*)realloc(p, 2048 * sizeof(int));
-  p[1024] = 0;
-  free(p);
-
-  p = (int*)calloc(16, sizeof(int));
-  if (p[8] != 0)
-    return 1;
-  p[15]++;
-  if (16 * sizeof(int) != _msize(p))
-    return 2;
-  free(p);
-
-  p = new int;
-  *p = 42;
-  delete p;
-
-  p = new int[42];
-  p[15]++;
-  delete [] p;
-
-  printf("All ok\n");
-// CHECK: All ok
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: %run %t %t.dll | FileCheck %s
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_and_lib.cc (removed)
@@ -1,19 +0,0 @@
-// Just make sure we can link an implib into another DLL
-// This used to fail between r212699 and r212814.
-// RUN: %clang_cl_asan -DCONFIG=1 %s -c -Fo%t.1.obj
-// RUN: link /nologo /DLL /OUT:%t.1.dll %t.1.obj %asan_dll_thunk
-// RUN: %clang_cl_asan -DCONFIG=2 %s -c -Fo%t.2.obj
-// RUN: link /nologo /DLL /OUT:%t.2.dll %t.2.obj %t.1.lib %asan_dll_thunk
-// REQUIRES: asan-static-runtime
-
-#if CONFIG==1
-extern "C" __declspec(dllexport) int f1() {
-  int x = 0;
-  return 1;
-}
-#else
-extern "C" __declspec(dllexport) int f2() {
-  int x = 0;
-  return 2;
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc (removed)
@@ -1,23 +0,0 @@
-// 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 -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
-// RUN: %run %t %t.dll 2>&1 | FileCheck %s
-
-#include <iostream>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  // Just make sure we can use cout.
-  std::cout << "All ok\n";
-// CHECK: All ok
-
-  // This line forces a declaration of some global basic_ostream internal object that
-  // calls memcpy() in its constructor.  This doesn't work if __asan_init is not
-  // called early enough.
-  std::cout << 42;
-// CHECK: 42
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: %run %t %t.dll 2>&1 | FileCheck %s
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc (removed)
@@ -1,130 +0,0 @@
-// 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
-
-// Check that ASan does not CHECK fail when SEH is used around a crash from a
-// thread injected by control C.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-static void __declspec(noinline) CrashOnProcessDetach() {
-  printf("CrashOnProcessDetach\n");
-  fflush(stdout);
-  *static_cast<volatile int *>(0) = 0x356;
-}
-
-bool g_is_child = false;
-
-BOOL WINAPI DllMain(PVOID h, DWORD reason, PVOID reserved) {
-  if (reason == DLL_PROCESS_DETACH && g_is_child) {
-    printf("in DllMain DLL_PROCESS_DETACH\n");
-    fflush(stdout);
-    __try {
-      CrashOnProcessDetach();
-    } __except (1) {
-      printf("caught crash\n");
-      fflush(stdout);
-    }
-  }
-  return true;
-}
-
-static void run_child() {
-  // Send this process group Ctrl+C. That should only be this process.
-  printf("GenerateConsoleCtrlEvent\n");
-  fflush(stdout);
-  GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);
-  Sleep(10 * 1000); // Wait 10 seconds, and the process should die.
-  printf("unexpected execution after interrupt\n");
-  fflush(stdout);
-  exit(0x42);
-}
-
-static int WINAPI ignore_control_c(DWORD ctrl_type) {
-  // Don't interrupt the parent.
-  return ctrl_type == CTRL_C_EVENT;
-}
-
-static int run_parent() {
-  // Set an environment variable to tell the child process to interrupt itself.
-  if (!SetEnvironmentVariableW(L"DO_CONTROL_C", L"1")) {
-    printf("SetEnvironmentVariableW failed (0x%8lx).\n", GetLastError());
-    fflush(stdout);
-    return 2;
-  }
-
-  // Launch a new process using the current executable with a new console.
-  // Ctrl-C events are console-wide, so we need a new console.
-  STARTUPINFOW si;
-  memset(&si, 0, sizeof(si));
-  si.cb = sizeof(si);
-  // Hides the new console window that we are creating.
-  si.dwFlags |= STARTF_USESHOWWINDOW;
-  si.wShowWindow = SW_HIDE;
-  // Ensures that stdout still goes to the parent despite the new console.
-  si.dwFlags |= STARTF_USESTDHANDLES;
-  si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
-  si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
-  si.hStdError = GetStdHandle(STD_ERROR_HANDLE);
-
-  PROCESS_INFORMATION pi;
-  memset(&pi, 0, sizeof(pi));
-  int flags = CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE;
-  if (!CreateProcessW(nullptr,           // No module name (use command line)
-                      GetCommandLineW(), // Command line
-                      nullptr,           // Process handle not inheritable
-                      nullptr,           // Thread handle not inheritable
-                      TRUE,              // Set handle inheritance to TRUE
-                      flags,             // Flags to give the child a console
-                      nullptr,           // Use parent's environment block
-                      nullptr,           // Use parent's starting directory
-                      &si, &pi)) {
-    printf("CreateProcess failed (0x%08lx).\n", GetLastError());
-    fflush(stdout);
-    return 2;
-  }
-
-  // Wait until child process exits.
-  if (WaitForSingleObject(pi.hProcess, INFINITE) == WAIT_FAILED) {
-    printf("WaitForSingleObject failed (0x%08lx).\n", GetLastError());
-    fflush(stdout);
-    return 2;
-  }
-
-  // Get the exit code. It should be the one for ctrl-c events.
-  DWORD rc;
-  if (!GetExitCodeProcess(pi.hProcess, &rc)) {
-    printf("GetExitCodeProcess failed (0x%08lx).\n", GetLastError());
-    fflush(stdout);
-    return 2;
-  }
-  if (rc == STATUS_CONTROL_C_EXIT)
-    printf("child quit with STATUS_CONTROL_C_EXIT\n");
-  else
-    printf("unexpected exit code: 0x%08lx\n", rc);
-  fflush(stdout);
-
-  // Close process and thread handles.
-  CloseHandle(pi.hProcess);
-  CloseHandle(pi.hThread);
-  return 0;
-}
-
-// CHECK: in DllMain DLL_PROCESS_DETACH
-// CHECK: CrashOnProcessDetach
-// CHECK: caught crash
-// CHECK: child quit with STATUS_CONTROL_C_EXIT
-
-extern "C" int __declspec(dllexport) test_function() {
-  wchar_t buf[260];
-  int len = GetEnvironmentVariableW(L"DO_CONTROL_C", buf, 260);
-  if (len > 0) {
-    g_is_child = true;
-    run_child();
-  } else {
-    exit(run_parent());
-  }
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -O2 %s -Fe%t.dll
 // RUNX: %run %t %t.dll 2>&1 | FileCheck %s
 

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 //
 // 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

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_heap_allocation.cc (removed)
@@ -1,30 +0,0 @@
-
-// RUN: %clang_cl -LD %s -Fe%t.dll -DHEAP_LIBRARY -MD
-// RUN: %clang_cl %s %t.lib -Fe%t -fsanitize=address -MT
-// RUN: %run %t 2>&1 | FileCheck %s
-
-// Check that ASan does not fail when releasing allocations that occurred within
-// an uninstrumented DLL.
-
-#ifdef HEAP_LIBRARY
-#include <memory>
-#include <windows.h>
-
-std::unique_ptr<int> __declspec(dllexport) myglobal(new int(42));
-BOOL WINAPI DllMain(PVOID h, DWORD reason, PVOID reserved) {
-  return TRUE;
-}
-
-#else
-
-#include <memory>
-extern std::unique_ptr<int> __declspec(dllimport) myglobal;
-int main(int argc, char **argv) {
-  printf("myglobal: %d\n", *myglobal);
-  return 0;
-}
-
-#endif
-
-// CHECK: myglobal: 42
-// CHECK-NOT: ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc (removed)
@@ -1,79 +0,0 @@
-// This is a host program for DLL tests.
-//
-// Just make sure we can compile this.
-// The actual compile&run sequence is to be done by the DLL tests.
-// 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
-//       differ from 32-bit and 64-bit.
-// RUN: dumpbin /EXPORTS %t | grep -o "__asan_wrap[^ ]*" | sed -e s/@.*// > %t.exports1
-//
-// The exception handlers differ in 32-bit and 64-bit, so we ignore them:
-// RUN: grep '[E]XPORT:' %s | sed -e 's/.*[E]XPORT: //' > %t.exports2
-// EXPORT: __asan_wrap__except_handler3
-// EXPORT: __asan_wrap__except_handler4
-// EXPORT: __asan_wrap___C_specific_handler
-//
-// Get the list of ASan wrappers imported by the DLL RTL:
-// [BEWARE: be really careful with the sed commands, as this test can be run
-//  from different environemnts with different shells and seds]
-// RUN: grep INTERCEPT_LIBRARY_FUNCTION %p/../../../../lib/asan/asan_win_dll_thunk.cpp \
-// RUN:  | grep -v define | sed -e s/.*(/__asan_wrap_/ -e s/).*//              \
-// RUN:  > %t.imports1
-//
-// Add functions interecepted in asan_malloc.win.cpp and asan_win.cpp.
-// RUN: grep '[I]MPORT:' %s | sed -e 's/.*[I]MPORT: //' > %t.imports2
-// IMPORT: __asan_wrap_HeapAlloc
-// IMPORT: __asan_wrap_HeapFree
-// IMPORT: __asan_wrap_HeapReAlloc
-// IMPORT: __asan_wrap_HeapSize
-// IMPORT: __asan_wrap_CreateThread
-// IMPORT: __asan_wrap_RaiseException
-// IMPORT: __asan_wrap_RtlRaiseException
-// IMPORT: __asan_wrap_SetUnhandledExceptionFilter
-// IMPORT: __asan_wrap_RtlSizeHeap
-// IMPORT: __asan_wrap_RtlAllocateHeap
-// IMPORT: __asan_wrap_RtlReAllocateHeap
-// IMPORT: __asan_wrap_RtlFreeHeap
-//
-// RUN: cat %t.imports1 %t.imports2 | sort | uniq > %t.imports-sorted
-// RUN: cat %t.exports1 %t.exports2 | sort | uniq > %t.exports-sorted
-//
-// Now make sure the DLL thunk imports everything:
-// RUN: echo
-// RUN: echo "=== NOTE === If you see a mismatch below, please update asan_win_dll_thunk.cpp"
-// RUN: diff %t.imports-sorted %t.exports-sorted
-// REQUIRES: asan-static-runtime
-
-#include <stdio.h>
-#include <windows.h>
-
-int main(int argc, char **argv) {
-  if (argc != 2) {
-    printf("Usage: %s [client].dll\n", argv[0]);
-    return 101;
-  }
-
-  const char *dll_name = argv[1];
-
-  HMODULE h = LoadLibrary(dll_name);
-  if (!h) {
-    printf("Could not load DLL: %s (code: %lu)!\n",
-           dll_name, GetLastError());
-    return 102;
-  }
-
-  typedef int (*test_function)();
-  test_function gf = (test_function)GetProcAddress(h, "test_function");
-  if (!gf) {
-    printf("Could not locate test_function in the DLL!\n");
-    FreeLibrary(h);
-    return 103;
-  }
-
-  int ret = gf();
-
-  FreeLibrary(h);
-  return ret;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc (removed)
@@ -1,27 +0,0 @@
-// 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
-// hookable with the interception library. There is not enough padding before
-// the function and there is a short jump on the second instruction which
-// doesn't not allow enough space to encode a 64-bit indirect jump.
-// UNSUPPORTED: x86_64-windows
-
-#include <string.h>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char buff[6] = "Hello";
-
-  memchr(buff, 'z', 7);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: READ of size 7 at [[ADDR]] thread T0
-// CHECK-NEXT:  __asan_wrap_memchr
-// CHECK-NEXT:  memchr
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cc:[[@LINE-5]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cc
-// CHECK: 'buff'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -19,9 +19,9 @@ int test_function() {
 // CHECK: READ of size 7 at [[ADDR]] thread T0
 // CHECK-NEXT:  __asan_wrap_memchr
 // CHECK-NEXT:  memchr
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cc:[[@LINE-5]]
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cpp:[[@LINE-5]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cc
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memchr.cpp
 // CHECK: 'buff'{{.*}} <== Memory access at offset {{.*}} overflows this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc (removed)
@@ -1,32 +0,0 @@
-// 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 -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
-// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char buff1[6] = "Hello", buff2[5];
-
-  memcpy(buff2, buff1, 5);
-  if (buff1[2] != buff2[2])
-    return 2;
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  memcpy(buff2, buff1, 6);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 6 at [[ADDR]] thread T0
-// CHECK-NEXT:  __asan_{{.*}}memcpy
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cc:[[@LINE-4]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cc
-// CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -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
 
@@ -24,9 +24,9 @@ int test_function() {
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 6 at [[ADDR]] thread T0
 // CHECK-NEXT:  __asan_{{.*}}memcpy
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cc:[[@LINE-4]]
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cpp:[[@LINE-4]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cc
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy.cpp
 // CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc (removed)
@@ -1,34 +0,0 @@
-// 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>
-#include <string.h>
-
-void call_memcpy(void* (*f)(void *, const void *, size_t),
-                 void *a, const void *b, size_t c) {
-  f(a, b, c);
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char buff1[6] = "Hello", buff2[5];
-
-  call_memcpy(&memcpy, buff2, buff1, 5);
-  if (buff1[2] != buff2[2])
-    return 2;
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  call_memcpy(&memcpy, buff2, buff1, 6);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 6 at [[ADDR]] thread T0
-// CHECK-NEXT:  __asan_{{.*}}mem{{.*}}
-// CHECK-NEXT:  call_memcpy
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cc:[[@LINE-5]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cc
-// CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -26,9 +26,9 @@ int test_function() {
 // CHECK: WRITE of size 6 at [[ADDR]] thread T0
 // CHECK-NEXT:  __asan_{{.*}}mem{{.*}}
 // CHECK-NEXT:  call_memcpy
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cc:[[@LINE-5]]
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cpp:[[@LINE-5]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cc
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memcpy_indirect.cpp
 // CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc (removed)
@@ -1,32 +0,0 @@
-// 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 -Od %s -Fe%t.dll -link /OPT:REF /OPT:ICF
-// RUN: not %run %t %t.dll 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char buff[5] = "aaaa";
-
-  memset(buff, 'b', 5);
-  if (buff[2] != 'b')
-    return 2;
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  memset(buff, 'c', 6);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 6 at [[ADDR]] thread T0
-// CHECK-NEXT:  __asan_memset
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cc:[[@LINE-4]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cc
-// CHECK: 'buff'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -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
 
@@ -24,9 +24,9 @@ int test_function() {
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 6 at [[ADDR]] thread T0
 // CHECK-NEXT:  __asan_memset
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cc:[[@LINE-4]]
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cpp:[[@LINE-4]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cc
+// CHECK-NEXT:  test_function {{.*}}dll_intercept_memset.cpp
 // CHECK: 'buff'{{.*}} <== Memory access at offset {{.*}} overflows this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc (removed)
@@ -1,28 +0,0 @@
-// 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>
-#include <string.h>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char str[] = "Hello!";
-  if (6 != strlen(str))
-    return 1;
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  str[6] = '!';  // Removes '\0' at the end!
-  int len = strlen(str);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// FIXME: Should be READ of size 1, see issue 155.
-// CHECK: READ of size {{[0-9]+}} at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .*}}strlen
-// CHECK-NEXT: {{#1 .* test_function .*}}dll_intercept_strlen.cc:[[@LINE-5]]
-//
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT: test_function {{.*}}dll_intercept_strlen.cc:
-  return len > 42;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -20,9 +20,9 @@ int test_function() {
 // FIXME: Should be READ of size 1, see issue 155.
 // CHECK: READ of size {{[0-9]+}} at [[ADDR]] thread T0
 // CHECK-NEXT: {{#0 .*}}strlen
-// CHECK-NEXT: {{#1 .* test_function .*}}dll_intercept_strlen.cc:[[@LINE-5]]
+// CHECK-NEXT: {{#1 .* test_function .*}}dll_intercept_strlen.cpp:[[@LINE-5]]
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT: test_function {{.*}}dll_intercept_strlen.cc:
+// CHECK-NEXT: test_function {{.*}}dll_intercept_strlen.cpp:
   return len > 42;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_large_function.cc (removed)
@@ -1,12 +0,0 @@
-// Make sure we can link a DLL with large functions which would mean
-// functions such as __asan_loadN and __asan_storeN will be called
-// from the DLL.  We simulate the large function with
-// -mllvm -asan-instrumentation-with-call-threshold=0.
-// RUN: %clang_cl_asan %s -c -Fo%t.obj -mllvm -asan-instrumentation-with-call-threshold=0
-// RUN: link /nologo /DLL /OUT:%t.dll %t.obj %asan_dll_thunk
-// REQUIRES: asan-static-runtime
-
-void f(long* foo, long* bar) {
-  // One load and one store
-  *foo = *bar;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc (removed)
@@ -1,23 +0,0 @@
-// 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>
-extern "C" __declspec(dllexport)
-int test_function() {
-  char *buffer = (char*)malloc(42);
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_malloc_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
-//
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK-LABEL: allocated by thread T0 here:
-// CHECK-NEXT:   malloc
-// CHECK-NEXT:   test_function {{.*}}dll_malloc_left_oob.cc:[[@LINE-10]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
-// CHECK-LABEL: SUMMARY
-  free(buffer);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -9,14 +9,14 @@ int test_function() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_malloc_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
+// CHECK-NEXT: test_function {{.*}}dll_malloc_left_oob.cpp:[[@LINE-3]]
+// CHECK-NEXT: main {{.*}}dll_host.cpp
 //
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK-LABEL: allocated by thread T0 here:
 // CHECK-NEXT:   malloc
-// CHECK-NEXT:   test_function {{.*}}dll_malloc_left_oob.cc:[[@LINE-10]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
+// CHECK-NEXT:   test_function {{.*}}dll_malloc_left_oob.cpp:[[@LINE-10]]
+// CHECK-NEXT:   main {{.*}}dll_host.cpp
 // CHECK-LABEL: SUMMARY
   free(buffer);
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc (removed)
@@ -1,28 +0,0 @@
-// 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>
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  int *buffer = (int*)malloc(42);
-  free(buffer);
-  buffer[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-3]]
-// CHECK-NEXT:  main {{.*}}dll_host
-//
-// CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// CHECK-NEXT:  free
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-10]]
-// CHECK-NEXT:  main {{.*}}dll_host
-//
-// CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK-NEXT:  malloc
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-16]]
-// CHECK-NEXT:  main {{.*}}dll_host
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -11,18 +11,18 @@ int test_function() {
   buffer[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-3]]
+// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cpp:[[@LINE-3]]
 // CHECK-NEXT:  main {{.*}}dll_host
 //
 // CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // CHECK-NEXT:  free
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-10]]
+// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cpp:[[@LINE-10]]
 // CHECK-NEXT:  main {{.*}}dll_host
 //
 // CHECK-LABEL: previously allocated by thread T0 here:
 // CHECK-NEXT:  malloc
-// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cc:[[@LINE-16]]
+// CHECK-NEXT:  test_function {{.*}}dll_malloc_uaf.cpp:[[@LINE-16]]
 // CHECK-NEXT:  main {{.*}}dll_host
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc (removed)
@@ -1,28 +0,0 @@
-// 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>
-
-void noreturn_f() {
-  int subscript = -1;
-  char buffer[42];
-  buffer[subscript] = 42;
-  _exit(1);
-// CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc:[[@LINE-4]]
-// CHECK-NEXT:  test_function{{.*}}dll_noreturn.cc
-// CHECK-NEXT:  main{{.*}}dll_host.cc
-//
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc
-// CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
-// CHECK-LABEL: SUMMARY
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  noreturn_f();
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -11,12 +11,12 @@ void noreturn_f() {
   _exit(1);
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc:[[@LINE-4]]
-// CHECK-NEXT:  test_function{{.*}}dll_noreturn.cc
-// CHECK-NEXT:  main{{.*}}dll_host.cc
+// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cpp:[[@LINE-4]]
+// CHECK-NEXT:  test_function{{.*}}dll_noreturn.cpp
+// CHECK-NEXT:  main{{.*}}dll_host.cpp
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cc
+// CHECK-NEXT:  noreturn_f{{.*}}dll_noreturn.cpp
 // CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
 // CHECK-LABEL: SUMMARY
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc (removed)
@@ -1,18 +0,0 @@
-// 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))
-static void NullDeref(int *ptr) {
-  // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
-  // CHECK:   {{0x0*000.. .*pc 0x.*}}
-  ptr[10]++;  // BOOM
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in test_function .*\dll_null_deref.cc:}}[[@LINE-1]]
-  // CHECK: AddressSanitizer can not provide additional info.
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -12,7 +12,7 @@ static void NullDeref(int *ptr) {
 extern "C" __declspec(dllexport)
 int test_function() {
   NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in test_function .*\dll_null_deref.cc:}}[[@LINE-1]]
+  // CHECK: {{    #1 0x.* in test_function .*\dll_null_deref.cpp:}}[[@LINE-1]]
   // CHECK: AddressSanitizer can not provide additional info.
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc (removed)
@@ -1,25 +0,0 @@
-// 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)
-int test_function() {
-  char *buffer = new char[42];
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
-//
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK-LABEL: allocated by thread T0 here:
-// FIXME: Should get rid of the malloc/free frames called from the inside of
-// operator new/delete in DLLs when using -MT CRT.
-// FIXME: The 'operator new' frame should have [].
-// CHECK:        operator new
-// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_left_oob.cc:[[@LINE-13]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
-// CHECK-LABEL: SUMMARY
-  delete [] buffer;
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -8,8 +8,8 @@ int test_function() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
+// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_left_oob.cpp:[[@LINE-3]]
+// CHECK-NEXT: main {{.*}}dll_host.cpp
 //
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK-LABEL: allocated by thread T0 here:
@@ -17,8 +17,8 @@ int test_function() {
 // operator new/delete in DLLs when using -MT CRT.
 // FIXME: The 'operator new' frame should have [].
 // CHECK:        operator new
-// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_left_oob.cc:[[@LINE-13]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
+// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_left_oob.cpp:[[@LINE-13]]
+// CHECK-NEXT:   main {{.*}}dll_host.cpp
 // CHECK-LABEL: SUMMARY
   delete [] buffer;
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc (removed)
@@ -1,33 +0,0 @@
-// 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 {
-  int x;
-  ~C() {}
-};
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  C *buffer = new C[42];
-  buffer[-(1 + sizeof(void*) / 4)].x = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
-//
-// FIXME: Currently it says "4 bytes ... left of 172-byte region",
-//        should be "8 bytes ... left of 168-byte region", see
-//        https://code.google.com/p/address-sanitizer/issues/detail?id=314
-// CHECK: [[ADDR]] is located {{.*}} bytes to the left of {{(172|176)}}-byte region
-// FIXME: Should get rid of the malloc/free frames called from the inside of
-// operator new/delete in DLLs when using -MT CRT.
-// FIXME: The operator new frame should have [].
-// CHECK-LABEL: allocated by thread T0 here:
-// CHECK:        operator new
-// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cc:[[@LINE-16]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
-// CHECK-LABEL: SUMMARY
-  delete [] buffer;
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -13,8 +13,8 @@ int test_function() {
   buffer[-(1 + sizeof(void*) / 4)].x = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cc:[[@LINE-3]]
-// CHECK-NEXT: main {{.*}}dll_host.cc
+// CHECK-NEXT: test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cpp:[[@LINE-3]]
+// CHECK-NEXT: main {{.*}}dll_host.cpp
 //
 // FIXME: Currently it says "4 bytes ... left of 172-byte region",
 //        should be "8 bytes ... left of 168-byte region", see
@@ -25,8 +25,8 @@ int test_function() {
 // FIXME: The operator new frame should have [].
 // CHECK-LABEL: allocated by thread T0 here:
 // CHECK:        operator new
-// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cc:[[@LINE-16]]
-// CHECK-NEXT:   main {{.*}}dll_host.cc
+// CHECK-NEXT:   test_function {{.*}}dll_operator_array_new_with_dtor_left_oob.cpp:[[@LINE-16]]
+// CHECK-NEXT:   main {{.*}}dll_host.cpp
 // CHECK-LABEL: SUMMARY
   delete [] buffer;
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc (removed)
@@ -1,35 +0,0 @@
-// 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>
-
-void should_not_crash(volatile char *c) {
-  *c = 42;
-}
-
-void should_crash(volatile char *c) {
-  *c = 42;
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char buffer[256];
-  should_not_crash(&buffer[0]);
-  __asan_poison_memory_region(buffer, 128);
-  should_not_crash(&buffer[192]);
-  __asan_unpoison_memory_region(buffer, 64);
-  should_not_crash(&buffer[32]);
-
-  should_crash(&buffer[96]);
-// CHECK: AddressSanitizer: use-after-poison on address [[ADDR:0x[0-9a-f]+]]
-// CHECK-NEXT: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: should_crash{{.*}}\dll_poison_unpoison.cc
-// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc:[[@LINE-4]]
-// CHECK-NEXT: main
-//
-// CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc
-// CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -24,12 +24,12 @@ int test_function() {
   should_crash(&buffer[96]);
 // CHECK: AddressSanitizer: use-after-poison on address [[ADDR:0x[0-9a-f]+]]
 // CHECK-NEXT: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: should_crash{{.*}}\dll_poison_unpoison.cc
-// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc:[[@LINE-4]]
+// CHECK-NEXT: should_crash{{.*}}\dll_poison_unpoison.cpp
+// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cpp:[[@LINE-4]]
 // CHECK-NEXT: main
 //
 // CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc
+// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cpp
 // CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc (removed)
@@ -1,40 +0,0 @@
-// 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
-// initialization failure.
-// REQUIRES: asan-dynamic-runtime
-
-#include <windows.h>
-#include <stdio.h>
-
-extern "C" {
-#if defined(EXE)
-__declspec(dllimport) int foo_from_dll();
-
-// CHECK: in DLL(reason=1)
-int main(int argc, char **argv) {
-  foo_from_dll();
-// CHECK: hello!
-  printf("hello!\n");
-  fflush(0);
-// CHECK: in DLL(reason=0)
-}
-#elif defined(DLL)
-// This global is registered at startup.
-int x[42];
-
-__declspec(dllexport) int foo_from_dll() {
-  return x[2];
-}
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  printf("in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-#else
-# error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc (removed)
@@ -1,50 +0,0 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
-//
-// Check both -GS and -GS- builds:
-// RUN: %clang_cl_asan -GS  -LD -Od %s -Fe%t.dll
-// RUN: %run %t %t.dll
-//
-// RUN: %clang_cl_asan -GS- -LD -Od %s -Fe%t.dll
-// RUN: %run %t %t.dll
-
-#include <windows.h>
-#include <assert.h>
-#include <stdio.h>
-
-// Should just "#include <sanitizer/asan_interface.h>" when C++ exceptions are
-// supported and we don't need to use CL.
-extern "C" bool __asan_address_is_poisoned(void *p);
-
-void ThrowAndCatch();
-
-__declspec(noinline)
-void Throw() {
-  int local, zero = 0;
-  fprintf(stderr, "Throw:  %p\n", &local);
-  local = 5 / zero;
-}
-
-__declspec(noinline)
-void ThrowAndCatch() {
-  int local;
-  __try {
-    Throw();
-  } __except(EXCEPTION_EXECUTE_HANDLER) {
-    fprintf(stderr, "__except:  %p\n", &local);
-  }
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  char x[32];
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  ThrowAndCatch();
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  assert(!__asan_address_is_poisoned(x + 32));
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 //
 // Check both -GS and -GS- builds:
 // RUN: %clang_cl_asan -GS  -LD -Od %s -Fe%t.dll

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc (removed)
@@ -1,28 +0,0 @@
-// 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>
-
-char *x;
-
-void foo() {
-  char stack_buffer[42];
-  x = &stack_buffer[13];
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  foo();
-  *x = 42;
-// CHECK: AddressSanitizer: stack-use-after-return
-// CHECK: WRITE of size 1 at [[ADDR:.*]] thread T0
-// CHECK-NEXT:  test_function{{.*}}dll_stack_use_after_return.cc:[[@LINE-3]]
-// CHECK-NEXT:  main
-//
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: #0 {{.*}} foo{{.*}}dll_stack_use_after_return.cc
-// CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -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
 
@@ -17,11 +17,11 @@ int test_function() {
   *x = 42;
 // CHECK: AddressSanitizer: stack-use-after-return
 // CHECK: WRITE of size 1 at [[ADDR:.*]] thread T0
-// CHECK-NEXT:  test_function{{.*}}dll_stack_use_after_return.cc:[[@LINE-3]]
+// CHECK-NEXT:  test_function{{.*}}dll_stack_use_after_return.cpp:[[@LINE-3]]
 // CHECK-NEXT:  main
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: #0 {{.*}} foo{{.*}}dll_stack_use_after_return.cc
+// CHECK-NEXT: #0 {{.*}} foo{{.*}}dll_stack_use_after_return.cpp
 // CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc (removed)
@@ -1,36 +0,0 @@
-// 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>
-#include <malloc.h>
-
-DWORD WINAPI thread_proc(void *context) {
-  int subscript = -1;
-  char stack_buffer[42];
-  stack_buffer[subscript] = 42;
-// CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]]
-//
-// CHECK: Address [[ADDR]] is located in stack of thread T1 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc
-//
-// CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
-
-  return 0;
-}
-
-extern "C" __declspec(dllexport)
-int test_function() {
-  HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
-// CHECK-LABEL: Thread T1 created by T0 here:
-// CHECK:         test_function{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]]
-// CHECK-NEXT:    main{{.*}}dll_host.cc
-// CHECK-LABEL: SUMMARY
-  if (thr == 0)
-    return 1;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 2;
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -1,4 +1,4 @@
-// RUN: %clang_cl_asan -Od %p/dll_host.cc -Fe%t
+// RUN: %clang_cl_asan -Od %p/dll_host.cpp -Fe%t
 // RUN: %clang_cl_asan -LD -Od %s -Fe%t.dll
 // RUN: not %run %t %t.dll 2>&1 | FileCheck %s
 
@@ -11,10 +11,10 @@ DWORD WINAPI thread_proc(void *context)
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]]
+// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cpp:[[@LINE-3]]
 //
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cc
+// CHECK-NEXT:  thread_proc{{.*}}dll_thread_stack_array_left_oob.cpp
 //
 // CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
 
@@ -25,8 +25,8 @@ extern "C" __declspec(dllexport)
 int test_function() {
   HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
 // CHECK-LABEL: Thread T1 created by T0 here:
-// CHECK:         test_function{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]]
-// CHECK-NEXT:    main{{.*}}dll_host.cc
+// CHECK:         test_function{{.*}}dll_thread_stack_array_left_oob.cpp:[[@LINE-2]]
+// CHECK-NEXT:    main{{.*}}dll_host.cpp
 // CHECK-LABEL: SUMMARY
   if (thr == 0)
     return 1;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/dll_unload.cc (removed)
@@ -1,51 +0,0 @@
-#include <stdio.h>
-#include <windows.h>
-
-// RUN: %clang_cl_asan -LD /Od -DDLL %s -Fe%t.dll
-// RUN: %clang_cl /Od -DEXE %s -Fe%te.exe
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %te.exe %t.dll 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-// REQUIRES: asan-32-bits
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-extern "C" {
-#if defined(EXE)
-
-int main(int argc, char **argv) {
-  void *region_without_hooks = HeapAlloc(GetProcessHeap(), 0, 10);
-  HMODULE lib = LoadLibraryA(argv[1]);
-  assert(lib != INVALID_HANDLE_VALUE);
-
-  void *region_w_hooks = HeapAlloc(GetProcessHeap(), 0, 10);
-  assert(region_w_hooks != nullptr);
-  assert(0 != FreeLibrary(lib));
-
-  fprintf(stderr, "WITHOUT:0x%08x\n", (unsigned int)region_without_hooks);
-  fprintf(stderr, "WITH:0x%08x\n", (unsigned int)region_w_hooks);
-
-  assert(0 != HeapFree(GetProcessHeap(), 0, region_without_hooks));
-  assert(0 != HeapFree(GetProcessHeap(), 0, region_w_hooks));
-
-  HeapFree(GetProcessHeap(), 0, region_w_hooks); //will dump
-}
-#elif defined(DLL)
-// This global is registered at startup.
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  fprintf(stderr, "in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: WITHOUT:[[WITHOUT:0x[0-9a-fA-F]+]]
-// CHECK: WITH:[[WITH:0x[0-9a-fA-F]+]]
-// CHECK: AddressSanitizer: attempting double-free on [[WITH]] in thread T0:
-
-#else
-#error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  int *x = (int*)malloc(42 * sizeof(int));
-  free(x);
-  free(x);
-// CHECK: AddressSanitizer: attempting double-free on [[ADDR:0x[0-9a-f]+]]
-// CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-8]]
-// CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-12]]
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cpp Mon Aug  5 09:48:12 2019
@@ -9,13 +9,13 @@ int main() {
   free(x);
 // CHECK: AddressSanitizer: attempting double-free on [[ADDR:0x[0-9a-f]+]]
 // CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#1 .* main .*double_free.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*double_free.cpp}}:[[@LINE-8]]
 // CHECK-LABEL: previously allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*double_free.cc}}:[[@LINE-12]]
+// CHECK-NEXT: {{#1 .* main .*double_free.cpp}}:[[@LINE-12]]
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  int *x = new int[42];
-  delete [] x;
-  delete [] x;
-// CHECK: AddressSanitizer: attempting double-free on [[ADDR:0x[0-9a-f]+]]
-// FIXME: The 'operator delete' frame should have [].
-// CHECK-NEXT: {{#0 .* operator delete}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-4]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// FIXME: The 'operator delete' frame should have [].
-// CHECK-NEXT: {{#0 .* operator delete}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-10]]
-// CHECK-LABEL: previously allocated by thread T0 here:
-// FIXME: The 'operator new' frame should have [].
-// CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-15]]
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cpp Mon Aug  5 09:48:12 2019
@@ -10,16 +10,16 @@ int main() {
 // CHECK: AddressSanitizer: attempting double-free on [[ADDR:0x[0-9a-f]+]]
 // FIXME: The 'operator delete' frame should have [].
 // CHECK-NEXT: {{#0 .* operator delete}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-4]]
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cpp}}:[[@LINE-4]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 168-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // FIXME: The 'operator delete' frame should have [].
 // CHECK-NEXT: {{#0 .* operator delete}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-10]]
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cpp}}:[[@LINE-10]]
 // CHECK-LABEL: previously allocated by thread T0 here:
 // FIXME: The 'operator new' frame should have [].
 // CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cc}}:[[@LINE-15]]
+// CHECK-NEXT: {{#1 .* main .*double_operator_delete.cpp}}:[[@LINE-15]]
   return 0;
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/free_hook_realloc.cc (removed)
@@ -1,40 +0,0 @@
-// Check that free hook doesn't conflict with Realloc.
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-
-// FIXME: merge this with the common free_hook_realloc test when we can run
-// common tests on Windows.
-
-// FIXME: Doesn't work with DLLs
-// XFAIL: win32-dynamic-asan
-
-#include <stdlib.h>
-#include <io.h>
-#include <sanitizer/allocator_interface.h>
-
-static void *glob_ptr;
-
-extern "C" {
-void __sanitizer_free_hook(const volatile void *ptr) {
-  if (ptr == glob_ptr) {
-    *(int*)ptr = 0;
-    write(1, "FreeHook\n", sizeof("FreeHook\n"));
-  }
-}
-}
-
-int main() {
-  int *x = (int*)malloc(100);
-  x[0] = 42;
-  glob_ptr = x;
-  int *y = (int*)realloc(x, 200);
-  // Verify that free hook was called and didn't spoil the memory.
-  if (y[0] != 42) {
-    _exit(1);
-  }
-  write(1, "Passed\n", sizeof("Passed\n"));
-  free(y);
-  // CHECK: FreeHook
-  // CHECK: Passed
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -fuse-ld=lld -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <string.h>
-int main(int argc, char **argv) {
-  static char XXX[10];
-  static char YYY[10];
-  static char ZZZ[10];
-  memset(XXX, 0, 10);
-  memset(YYY, 0, 10);
-  memset(ZZZ, 0, 10);
-  int res = YYY[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*fuse-lld-globals.cc:}}[[@LINE-2]]
-  // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
-  // CHECK:   {{.*YYY.* of size 10}}
-  res += XXX[argc] + ZZZ[argc];
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld-globals.cpp Mon Aug  5 09:48:12 2019
@@ -10,7 +10,7 @@ int main(int argc, char **argv) {
   memset(ZZZ, 0, 10);
   int res = YYY[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*fuse-lld-globals.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*fuse-lld-globals.cpp:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
   // CHECK:   {{.*YYY.* of size 10}}
   res += XXX[argc] + ZZZ[argc];

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc (removed)
@@ -1,19 +0,0 @@
-// If we have LLD, see that things more or less work.
-//
-// REQUIRES: lld-available
-//
-// RUN: %clangxx_asan -O2 %s -o %t.exe -g -gcodeview -fuse-ld=lld -Wl,-debug
-// RUN: not %run %t.exe 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: heap-use-after-free
-  // CHECK: free
-  // CHECK: main{{.*}}fuse-lld.cc:[[@LINE-4]]:3
-  // CHECK: malloc
-  // CHECK: main{{.*}}fuse-lld.cc:[[@LINE-7]]:20
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cpp Mon Aug  5 09:48:12 2019
@@ -13,7 +13,7 @@ int main() {
   return x[5];
   // CHECK: heap-use-after-free
   // CHECK: free
-  // CHECK: main{{.*}}fuse-lld.cc:[[@LINE-4]]:3
+  // CHECK: main{{.*}}fuse-lld.cpp:[[@LINE-4]]:3
   // CHECK: malloc
-  // CHECK: main{{.*}}fuse-lld.cc:[[@LINE-7]]:20
+  // CHECK: main{{.*}}fuse-lld.cpp:[[@LINE-7]]:20
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t | FileCheck %s
-
-#include <windows.h>
-#include <stdio.h>
-
-int main(void) {
-  static const char *foo = "foobarspam";
-  printf("Global string is `%s`\n", foo);
-// CHECK: Global string is `foobarspam`
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-#include <stdio.h>
-
-extern "C" const char *foo = "foobarspam";
-
-int main(void) {
-  if (foo[16])
-    printf("Boo\n");
-// CHECK-NOT: Boo
-// CHECK: AddressSanitizer: global-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: READ of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT:   {{#0 .* main .*global_const_string_oob.cc:}}[[@LINE-5]]
-// CHECK: [[ADDR]] is located 5 bytes to the right of global variable [[STR:.*]] defined in {{'.*global_const_string_oob.cc:7:.*' .*}} of size 11
-// CHECK:   [[STR]] is ascii string 'foobarspam'
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cpp Mon Aug  5 09:48:12 2019
@@ -12,8 +12,8 @@ int main(void) {
 // CHECK-NOT: Boo
 // CHECK: AddressSanitizer: global-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: READ of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT:   {{#0 .* main .*global_const_string_oob.cc:}}[[@LINE-5]]
-// CHECK: [[ADDR]] is located 5 bytes to the right of global variable [[STR:.*]] defined in {{'.*global_const_string_oob.cc:7:.*' .*}} of size 11
+// CHECK-NEXT:   {{#0 .* main .*global_const_string_oob.cpp:}}[[@LINE-5]]
+// CHECK: [[ADDR]] is located 5 bytes to the right of global variable [[STR:.*]] defined in {{'.*global_const_string_oob.cpp:7:.*' .*}} of size 11
 // CHECK:   [[STR]] is ascii string 'foobarspam'
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc (removed)
@@ -1,13 +0,0 @@
-// UNSUPPORTED: asan-64-bits
-// 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>
-
-int main() {
-  char *buffer;
-  buffer = (char *)HeapAlloc(GetProcessHeap(), 0, 32),
-  buffer[33] = 'a';
-  // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_double_free.cc (removed)
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <windows.h>
-
-// RUN: %clang_cl_asan -LD /Od -DDLL %s -Fe%t.dll
-// RUN: %clang_cl /Od -DEXE %s -Fe%te.exe
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %te.exe %t.dll 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-// REQUIRES: asan-32-bits
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-extern "C" {
-#if defined(EXE)
-
-int main(int argc, char **argv) {
-  void *region_without_hooks = HeapAlloc(GetProcessHeap(), 0, 10);
-  HMODULE lib = LoadLibraryA(argv[1]);
-  assert(lib != INVALID_HANDLE_VALUE);
-  assert(0 != FreeLibrary(lib));
-  assert(0 != HeapFree(GetProcessHeap(), 0, region_without_hooks));
-  assert(0 != HeapFree(GetProcessHeap(), 0, region_without_hooks));
-}
-#elif defined(DLL)
-// This global is registered at startup.
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  fprintf(stderr, "in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: AddressSanitizer: nested bug in the same thread, aborting.
-
-#else
-#error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_dll_unload_realloc_uaf.cc (removed)
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <windows.h>
-
-// RUN: %clang_cl_asan -LD /Od -DDLL %s -Fe%t.dll
-// RUN: %clang_cl /Od -DEXE %s -Fe%te.exe
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %te.exe %t.dll 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-// REQUIRES: asan-32-bits
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-extern "C" {
-#if defined(EXE)
-
-int main(int argc, char **argv) {
-  void *region_without_hooks = HeapAlloc(GetProcessHeap(), 0, 10);
-  HMODULE lib = LoadLibraryA(argv[1]);
-  assert(lib != INVALID_HANDLE_VALUE);
-  assert(0 != FreeLibrary(lib));
-  assert(0 != HeapFree(GetProcessHeap(), 0, region_without_hooks));
-  HeapReAlloc(GetProcessHeap(), 0, region_without_hooks, 100); //should throw nested error
-}
-#elif defined(DLL)
-// This global is registered at startup.
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  fprintf(stderr, "in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: AddressSanitizer: nested bug in the same thread, aborting.
-
-#else
-#error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc (removed)
@@ -1,16 +0,0 @@
-// 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>
-#include <windows.h>
-
-int main() {
-  void *allocation = HeapAlloc(GetProcessHeap(), 0, 10);
-  assert(allocation != 0);
-  assert(HeapFree(GetProcessHeap(), 0, allocation));
-  HeapFree(GetProcessHeap(), 0, allocation); //will dump
-  assert(0 && "HeapFree double free should produce an ASAN dump\n");
-  return 0;
-}
-
-// CHECK: AddressSanitizer: attempting double-free on [[addr:0x[0-9a-fA-F]+]] in thread T0:

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc (removed)
@@ -1,20 +0,0 @@
-// 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
-#include <assert.h>
-#include <stdio.h>
-#include <windows.h>
-
-extern "C" int
-__sanitizer_get_ownership(const volatile void *p);
-
-int main() {
-  char *buffer;
-  buffer = (char *)HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, 32);
-  buffer[0] = 'a';
-  assert(!__sanitizer_get_ownership(buffer));
-  HeapFree(GetProcessHeap(), 0, buffer);
-  puts("Okay");
-  // CHECK: Okay
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc (removed)
@@ -1,9 +0,0 @@
-// 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
-#include <windows.h>
-int main() {
-  void *nope = HeapAlloc(GetProcessHeap(), 0, ((size_t)0) - 1);
-  return (nope == nullptr) ? 0 : 1;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_rtl_transfer.cc (removed)
@@ -1,98 +0,0 @@
-#include "sanitizer\allocator_interface.h"
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-
-// RUN: %clang_cl_asan %s -o%t
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: asan-64-bits
-
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using ReAllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID, SIZE_T);
-
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-
-int main() {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr = (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't find RtlAllocateHeap");
-    return -1;
-  }
-
-  auto RtlReAllocateHeap_ptr = (ReAllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlReAllocateHeap");
-  if (RtlReAllocateHeap_ptr == 0) {
-    puts("Couldn't find RtlReAllocateHeap");
-    return -1;
-  }
-
-  //owned by rtl
-  void *alloc = RtlAllocateHeap_ptr(GetProcessHeap(),
-                                    HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY, 100);
-  assert(alloc);
-  for (int i = 0; i < 100; i++) {
-    assert(((char *)alloc)[i] == 0);
-    ((char *)alloc)[i] = '\xcc';
-  }
-
-  // still owned by rtl
-  alloc = RtlReAllocateHeap_ptr(GetProcessHeap(),
-                                HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY, alloc, 500);
-  assert(alloc && !__sanitizer_get_ownership(alloc) && HeapValidate(GetProcessHeap(), 0, alloc));
-  for (int i = 0; i < 100; i++) {
-    assert(((char *)alloc)[i] == '\xcc');
-  }
-  for (int i = 100; i < 500; i++) {
-    assert(((char *)alloc)[i] == 0);
-    ((char *)alloc)[i] = '\xcc';
-  }
-
-  //convert to asan owned
-  void *realloc = RtlReAllocateHeap_ptr(GetProcessHeap(),
-                                        HEAP_ZERO_MEMORY, alloc, 600);
-  alloc = nullptr;
-  assert(realloc && __sanitizer_get_ownership(realloc));
-
-  for (int i = 0; i < 500; i++) {
-    assert(((char *)realloc)[i] == '\xcc');
-  }
-  for (int i = 500; i < 600; i++) {
-    assert(((char *)realloc)[i] == 0);
-    ((char *)realloc)[i] = '\xcc';
-  }
-  realloc = RtlReAllocateHeap_ptr(GetProcessHeap(),
-                                  HEAP_ZERO_MEMORY, realloc, 2048);
-  assert(realloc && __sanitizer_get_ownership(realloc));
-
-  for (int i = 0; i < 600; i++) {
-    assert(((char *)realloc)[i] == '\xcc');
-  }
-  for (int i = 600; i < 2048; i++) {
-    assert(((char *)realloc)[i] == 0);
-    ((char *)realloc)[i] = '\xcc';
-  }
-  //convert back to rtl owned;
-  alloc = RtlReAllocateHeap_ptr(GetProcessHeap(),
-                                HEAP_ZERO_MEMORY | HEAP_GENERATE_EXCEPTIONS, realloc, 100);
-  assert(alloc && !__sanitizer_get_ownership(alloc) && HeapValidate(GetProcessHeap(), 0, alloc));
-  for (int i = 0; i < 100; i++) {
-    assert(((char *)alloc)[i] == '\xcc');
-    ((char *)alloc)[i] = 0;
-  }
-
-  auto usable_size = HeapSize(GetProcessHeap(), 0, alloc);
-  for (int i = 100; i < usable_size; i++) {
-    assert(((char *)alloc)[i] == 0);
-  }
-
-  printf("Success\n");
-}
-
-// CHECK-NOT: Assertion failed:
-// CHECK-NOT: AddressSanitizer
-// CHECK: Success
\ No newline at end of file

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t 2>&1 | FileCheck %s
-#include <stdio.h>
-#include <windows.h>
-
-int main() {
-  char *buffer;
-  buffer = (char *)HeapAlloc(GetProcessHeap(), 0, 32),
-  buffer[0] = 'a';
-  HeapFree(GetProcessHeap(), 0, buffer);
-  puts("Okay");
-  // CHECK: Okay
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_transfer.cc (removed)
@@ -1,28 +0,0 @@
-#include "sanitizer\allocator_interface.h"
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-// RUN: %clang_cl_asan %s -o%t
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: asan-64-bits
-
-int main() {
-  //owned by rtl
-  void *alloc = HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, 100);
-  assert(alloc);
-  // still owned by rtl
-  alloc = HeapReAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, alloc, 100);
-  assert(alloc && !__sanitizer_get_ownership(alloc) && HeapValidate(GetProcessHeap(), 0, alloc));
-  //convert to asan owned
-  void *realloc = HeapReAlloc(GetProcessHeap(), 0, alloc, 500);
-  alloc = nullptr;
-  assert(realloc && __sanitizer_get_ownership(realloc));
-  //convert back to rtl owned;
-  alloc = HeapReAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, realloc, 100);
-  assert(alloc && !__sanitizer_get_ownership(alloc) && HeapValidate(GetProcessHeap(), 0, alloc));
-  printf("Success\n");
-}
-
-// CHECK-NOT: assert
-// CHECK-NOT: AddressSanitizer
-// CHECK: Success
\ No newline at end of file

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc (removed)
@@ -1,13 +0,0 @@
-// 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>
-
-int main() {
-  char *buffer;
-  buffer = (char *)HeapAlloc(GetProcessHeap(), 0, 32),
-  HeapFree(GetProcessHeap(), 0, buffer);
-  buffer[0] = 'a';
-  // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_zero_size.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clang_cl_asan /Od -o %t %s
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=false %run %t 2>&1 | FileCheck %s
-// RUN: %clang_cl /Od -o %t %s
-// RUN: %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: asan-64-bits
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-
-int main() {
-  HANDLE heap = HeapCreate(0, 0, 0);
-  void *ptr = HeapAlloc(heap, 0, 4);
-  assert(ptr);
-  void *ptr2 = HeapReAlloc(heap, 0, ptr, 0);
-  assert(ptr2);
-  HeapFree(heap, 0, ptr2);
-  fprintf(stderr, "passed!\n");
-}
-
-// CHECK-NOT: double-free
-// CHECK-NOT: AddressSanitizer
-// CHECK: passed!

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc (removed)
@@ -1,23 +0,0 @@
-// 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>
-#include <windows.h>
-
-int main() {
-  char *oldbuf;
-  size_t sz = 8;
-  HANDLE procHeap = GetProcessHeap();
-  oldbuf = (char *)HeapAlloc(procHeap, 0, sz);
-  char *newbuf = oldbuf;
-  while (oldbuf == newbuf) {
-    sz *= 2;
-    newbuf = (char *)HeapReAlloc(procHeap, 0, oldbuf, sz);
-  }
-
-  newbuf[0] = 'a';
-  oldbuf[0] = 'a';
-  // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[WRITE2:0x[0-9a-f]+]] thread T0
-  // CHECK: #0 {{0x[0-9a-f]+ in main.*}}:[[@LINE-3]]
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_alloc_zero.cc (removed)
@@ -1,58 +0,0 @@
-// RUN: %clang_cl_asan /Od /MT -o %t %s
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: asan-64-bits
-#include <cassert>
-#include <iostream>
-#include <windows.h>
-
-int main() {
-  void *ptr = malloc(0);
-  if (ptr)
-    std::cerr << "allocated!\n";
-  ((char *)ptr)[0] = '\xff'; //check this 'allocate 1 instead of 0' hack hasn't changed
-
-  free(ptr);
-
-  /*
-        HeapAlloc hack for our asan interceptor is to change 0
-        sized allocations to size 1 to avoid weird inconsistencies
-        between how realloc and heaprealloc handle 0 size allocations.
-
-        Note this test relies on these instructions being intercepted.
-        Without ASAN HeapRealloc on line 27 would return a ptr whose
-        HeapSize would be 0. This test makes sure that the underlying behavior
-        of our hack hasn't changed underneath us.
-
-        We can get rid of the test (or change it to test for the correct
-        behavior) once we fix the interceptor or write a different allocator
-        to handle 0 sized allocations properly by default.
-
-    */
-  ptr = HeapAlloc(GetProcessHeap(), 0, 0);
-  if (!ptr)
-    return 1;
-  void *ptr2 = HeapReAlloc(GetProcessHeap(), 0, ptr, 0);
-  if (!ptr2)
-    return 1;
-  size_t heapsize = HeapSize(GetProcessHeap(), 0, ptr2);
-  if (heapsize != 1) { // will be 0 without ASAN turned on
-    std::cerr << "HeapAlloc size failure! " << heapsize << " != 1\n";
-    return 1;
-  }
-  void *ptr3 = HeapReAlloc(GetProcessHeap(), 0, ptr2, 3);
-  if (!ptr3)
-    return 1;
-  heapsize = HeapSize(GetProcessHeap(), 0, ptr3);
-
-  if (heapsize != 3) {
-    std::cerr << "HeapAlloc size failure! " << heapsize << " != 3\n";
-    return 1;
-  }
-  HeapFree(GetProcessHeap(), 0, ptr3);
-  return 0;
-}
-
-// CHECK: allocated!
-// CHECK-NOT: heap-buffer-overflow
-// CHECK-NOT: AddressSanitizer
-// CHECK-NOT: HeapAlloc size failure!
\ No newline at end of file

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc_zero_size.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clang_cl_asan /Od -o %t %s
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=false %run %t 2>&1 | FileCheck %s
-// RUN: %clang_cl /Od -o %t %s
-// RUN: %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: asan-64-bits
-#include <cassert>
-#include <stdio.h>
-#include<windows.h>
-
-int main() {
-  HANDLE heap = HeapCreate(0, 0, 0);
-  void *ptr = HeapAlloc(heap, 0, 4);
-  assert(ptr);
-  void *ptr2 = HeapReAlloc(heap, 0, ptr, 0);
-  assert(ptr2);
-  HeapFree(heap, 0, ptr2);
-  fprintf(stderr, "passed!\n");
-}
-
-// CHECK-NOT: double-free
-// CHECK-NOT: AddressSanitizer
-// CHECK: passed!
\ No newline at end of file

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc (removed)
@@ -1,9 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t | FileCheck %s
-
-#include <stdio.h>
-
-int main() {
-  printf("Hello, world!\n");
-// CHECK: Hello, world!
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-
-void call_memcpy(void* (*f)(void *, const void *, size_t),
-                 void *a, const void *b, size_t c) {
-  f(a, b, c);
-}
-
-int main() {
-  char buff1[6] = "Hello", buff2[5];
-
-  call_memcpy(&memcpy, buff2, buff1, 5);
-  if (buff1[2] != buff2[2])
-    return 2;
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  call_memcpy(&memcpy, buff2, buff1, 6);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 6 at [[ADDR]] thread T0
-// CHECK-NEXT:  __asan_{{.*}}mem{{.*}}
-// CHECK-NEXT:  call_mem{{.*}}
-// CHECK-NEXT:  main {{.*}}intercept_memcpy.cc:[[@LINE-5]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT:   #0 {{.*}} main
-// CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cpp Mon Aug  5 09:48:12 2019
@@ -24,7 +24,7 @@ int main() {
 // CHECK: WRITE of size 6 at [[ADDR]] thread T0
 // CHECK-NEXT:  __asan_{{.*}}mem{{.*}}
 // CHECK-NEXT:  call_mem{{.*}}
-// CHECK-NEXT:  main {{.*}}intercept_memcpy.cc:[[@LINE-5]]
+// CHECK-NEXT:  main {{.*}}intercept_memcpy.cpp:[[@LINE-5]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
 // CHECK-NEXT:   #0 {{.*}} main
 // CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc (removed)
@@ -1,32 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-#include <malloc.h>
-
-int main() {
-  char *ptr = _strdup("Hello");
-  int subscript = 1;
-  ptr[subscript] = '3';
-  printf("%s\n", ptr);
-  fflush(0);
-// CHECK: H3llo
-
-  subscript = -1;
-  ptr[subscript] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*}}intercept_strdup.cc:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 1 bytes to the left of 6-byte region
-// CHECK: allocated by thread T0 here:
-//
-// The first frame is our wrapper normally but will be malloc in the dynamic
-// config.
-// CHECK:   #0 {{.*}} in {{malloc|__asan_wrap_strdup}}
-//
-// The local call to _strdup above may be the second or third frame depending
-// on whether we're using the dynamic config.
-// CHECK:   #{{[12]}} {{.*}} in main {{.*}}intercept_strdup.cc:[[@LINE-21]]
-  free(ptr);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cpp Mon Aug  5 09:48:12 2019
@@ -17,7 +17,7 @@ int main() {
   ptr[subscript] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*}}intercept_strdup.cc:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*}}intercept_strdup.cpp:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 6-byte region
 // CHECK: allocated by thread T0 here:
 //
@@ -27,6 +27,6 @@ int main() {
 //
 // The local call to _strdup above may be the second or third frame depending
 // on whether we're using the dynamic config.
-// CHECK:   #{{[12]}} {{.*}} in main {{.*}}intercept_strdup.cc:[[@LINE-21]]
+// CHECK:   #{{[12]}} {{.*}} in main {{.*}}intercept_strdup.cpp:[[@LINE-21]]
   free(ptr);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-
-int main() {
-  char str[] = "Hello";
-  if (5 != strlen(str))
-    return 1;
-
-  printf("Initial test OK\n");
-  fflush(0);
-// CHECK: Initial test OK
-
-  str[5] = '!';  // Losing '\0' at the end.
-  int len = strlen(str);
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// FIXME: Should be READ of size 1, see issue 155.
-// CHECK: READ of size {{[0-9]+}} at [[ADDR]] thread T0
-// CHECK:      strlen 
-// CHECK-NEXT: main {{.*}}intercept_strlen.cc:[[@LINE-5]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT: main {{.*}}intercept_strlen.cc
-// CHECK: 'str'{{.*}} <== Memory access at offset {{.*}} overflows this variable
-  return len < 6;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cpp Mon Aug  5 09:48:12 2019
@@ -19,9 +19,9 @@ int main() {
 // FIXME: Should be READ of size 1, see issue 155.
 // CHECK: READ of size {{[0-9]+}} at [[ADDR]] thread T0
 // CHECK:      strlen 
-// CHECK-NEXT: main {{.*}}intercept_strlen.cc:[[@LINE-5]]
+// CHECK-NEXT: main {{.*}}intercept_strlen.cpp:[[@LINE-5]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
-// CHECK-NEXT: main {{.*}}intercept_strlen.cc
+// CHECK-NEXT: main {{.*}}intercept_strlen.cpp
 // CHECK: 'str'{{.*}} <== Memory access at offset {{.*}} overflows this variable
   return len < 6;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc (removed)
@@ -1,53 +0,0 @@
-// Check that the interface exported by asan static lib matches the list of
-// functions mentioned in sanitizer_interface.inc.
-//
-// Just make sure we can compile this.
-// 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.
-//
-// RUN: dumpbin /EXPORTS %t | sed "s/=.*//"                                    \
-// RUN:   | grep -o "\(__asan_\|__ubsan_\|__sanitizer_\|__sancov_\)[^ ]*"      \
-// RUN:   | grep -v "__asan_wrap"                                              \
-// RUN:   | sed -e s/@.*// > %t.exports
-//
-// [BEWARE: be really careful with the sed commands, as this test can be run
-//  from different environemnts with different shells and seds]
-//
-// RUN: grep -e "INTERFACE_FUNCTION"                                           \
-// RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
-// RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | sed -e "s/.*(//" -e "s/).*//" > %t.imports1
-//
-// RUN: grep -e "INTERFACE_WEAK_FUNCTION"                                      \
-// RUN:  %p/../../../../lib/asan/asan_interface.inc                            \
-// RUN:  %p/../../../../lib/ubsan/ubsan_interface.inc                          \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_common_interface.inc    \
-// RUN:  %p/../../../../lib/sanitizer_common/sanitizer_coverage_interface.inc  \
-// RUN:  | sed -e "s/.*(//" -e "s/).*/__dll/" > %t.imports2
-//
-// Add functions not included in the interface lists:
-// RUN: grep '[I]MPORT:' %s | sed -e 's/.*[I]MPORT: //' > %t.imports3
-// IMPORT: __asan_shadow_memory_dynamic_address
-// IMPORT: __asan_get_shadow_memory_dynamic_address
-// IMPORT: __asan_option_detect_stack_use_after_return
-// IMPORT: __asan_should_detect_stack_use_after_return
-// IMPORT: __asan_set_seh_filter
-// IMPORT: __asan_unhandled_exception_filter
-// IMPORT: __asan_test_only_reported_buggy_pointer
-// IMPORT: __sancov_lowest_stack
-// IMPORT: __ubsan_vptr_type_cache
-//
-// RUN: cat %t.imports1 %t.imports2 %t.imports3 | sort | uniq > %t.imports-sorted
-// RUN: cat %t.exports | sort | uniq > %t.exports-sorted
-//
-// Now make sure the DLL thunk imports everything:
-// RUN: echo
-// RUN: echo "=== NOTE === If you see a mismatch below, please update interface.inc files."
-// RUN: diff %t.imports-sorted %t.exports-sorted
-// REQUIRES: asan-static-runtime
-
-int main() { return 0; }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc (removed)
@@ -1,18 +0,0 @@
-// First, check this works with the default blacklist:
-// 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 -Od %s -fsanitize-blacklist=%p/../Helpers/initialization-blacklist.txt -Fe%t2
-// RUN: echo "42" | %run %t2 2>&1 | FileCheck %s
-
-#include <iostream>
-
-int main() {
-  int i;
-  std::cout << "Type i: ";
-  std::cin >> i;
-  return 0;
-// CHECK: Type i:
-// CHECK-NOT: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/longjmp.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clangxx_asan -O %s -o %t && %run %t
-
-// FIXME: merge this with the common longjmp test when we can run common
-// tests on Windows.
-
-#include <assert.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-static jmp_buf buf;
-
-int main() {
-  char x[32];
-  fprintf(stderr, "\nTestLongJmp\n");
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  if (0 == setjmp(buf))
-    longjmp(buf, 1);
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  assert(!__asan_address_is_poisoned(x + 32));
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)malloc(42);
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_left_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_left_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*malloc_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_left_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*malloc_left_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)malloc(42);
-  buffer[42] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_right_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_right_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[42] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_right_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*malloc_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_right_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*malloc_right_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)malloc(42);
-  free(buffer);
-  buffer[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_uaf.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
-// CHECK: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cc}}:[[@LINE-8]]
-// CHECK: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cc}}:[[@LINE-12]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -9,12 +9,12 @@ int main() {
   buffer[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*malloc_uaf.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*malloc_uaf.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
 // CHECK: freed by thread T0 here:
 // CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cpp}}:[[@LINE-8]]
 // CHECK: previously allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* malloc }}
-// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cc}}:[[@LINE-12]]
+// CHECK-NEXT: {{#1 .* main .*malloc_uaf.cpp}}:[[@LINE-12]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// FIXME: merge this with the common null_deref test when we can run common
-// tests on Windows.
-
-__attribute__((noinline))
-static void NullDeref(int *ptr) {
-  // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
-  // CHECK:   {{0x0*000.. .*pc 0x.*}}
-  ptr[10]++;  // BOOM
-}
-int main() {
-  NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in main.*null_deref.cc:}}[[@LINE-1]]:3
-  // CHECK: AddressSanitizer can not provide additional info.
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/null_deref.cpp Mon Aug  5 09:48:12 2019
@@ -10,6 +10,6 @@ static void NullDeref(int *ptr) {
 }
 int main() {
   NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in main.*null_deref.cc:}}[[@LINE-1]]:3
+  // CHECK: {{    #1 0x.* in main.*null_deref.cpp:}}[[@LINE-1]]:3
   // CHECK: AddressSanitizer can not provide additional info.
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc (removed)
@@ -1,40 +0,0 @@
-// Make sure everything works even if the main module doesn't have any stack
-// variables, thus doesn't explicitly reference any symbol exported by the
-// runtime thunk.
-//
-// 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>
-#include <string.h>
-
-extern "C" {
-#if defined(EXE)
-__declspec(dllimport) void foo1();
-__declspec(dllimport) void foo2();
-
-int main() {
-  foo1();
-  foo2();
-}
-#elif defined(DLL1)
-__declspec(dllexport) void foo1() {}
-#elif defined(DLL2)
-__attribute__((noinline))
-static void NullDeref(int *ptr) {
-  // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
-  // CHECK:   {{0x0*000.. .*pc 0x.*}}
-  ptr[10]++;  // BOOM
-}
-
-__declspec(dllexport) void foo2() {
-  NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in foo2.*null_deref_multiple_dlls.cc:}}[[@LINE-1]]
-  // CHECK: AddressSanitizer can not provide additional info.
-}
-#else
-# error oops!
-#endif
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cpp Mon Aug  5 09:48:12 2019
@@ -31,7 +31,7 @@ static void NullDeref(int *ptr) {
 
 __declspec(dllexport) void foo2() {
   NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in foo2.*null_deref_multiple_dlls.cc:}}[[@LINE-1]]
+  // CHECK: {{    #1 0x.* in foo2.*null_deref_multiple_dlls.cpp:}}[[@LINE-1]]
   // CHECK: AddressSanitizer can not provide additional info.
 }
 #else

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// REQUIRES: asan-32-bits
-
-#include <malloc.h>
-
-int main() {
-  while (true) {
-    void *ptr = malloc(200 * 1024 * 1024);  // 200MB
-  }
-// CHECK: SUMMARY: AddressSanitizer: out-of-memory
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-int main() {
-  char *buffer = new char[42];
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-3]]
-//
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK-LABEL: allocated by thread T0 here:
-// FIXME: The 'operator new' frame should have [].
-// CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-10]]
-  delete [] buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -6,12 +6,12 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*operator_array_new_left_oob.cpp}}:[[@LINE-3]]
 //
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK-LABEL: allocated by thread T0 here:
 // FIXME: The 'operator new' frame should have [].
 // CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_left_oob.cc}}:[[@LINE-10]]
+// CHECK-NEXT: {{#1 .* main .*operator_array_new_left_oob.cpp}}:[[@LINE-10]]
   delete [] buffer;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  char *buffer = new char[42];
-  buffer[42] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
-// CHECK: allocated by thread T0 here:
-// FIXME: The 'operator new' frame should have [].
-// CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-9]]
-  delete [] buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,11 +8,11 @@ int main() {
   buffer[42] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*operator_array_new_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
 // CHECK: allocated by thread T0 here:
 // FIXME: The 'operator new' frame should have [].
 // CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_array_new_right_oob.cc}}:[[@LINE-9]]
+// CHECK:   {{#1 .* main .*operator_array_new_right_oob.cpp}}:[[@LINE-9]]
   delete [] buffer;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc (removed)
@@ -1,24 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  char *buffer = new char[42];
-  delete [] buffer;
-  buffer[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_array_new_uaf.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// FIXME: The 'operator delete' frame should have [].
-// CHECK:   {{#0 .* operator delete}}
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-9]]
-// CHECK-LABEL: previously allocated by thread T0 here:
-// FIXME: The 'operator new' frame should have [].
-// CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-14]]
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -9,16 +9,16 @@ int main() {
   buffer[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_array_new_uaf.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*operator_array_new_uaf.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // FIXME: The 'operator delete' frame should have [].
 // CHECK:   {{#0 .* operator delete}}
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-9]]
+// CHECK:   {{#1 .* main .*operator_array_new_uaf.cpp}}:[[@LINE-9]]
 // CHECK-LABEL: previously allocated by thread T0 here:
 // FIXME: The 'operator new' frame should have [].
 // CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_array_new_uaf.cc}}:[[@LINE-14]]
+// CHECK:   {{#1 .* main .*operator_array_new_uaf.cpp}}:[[@LINE-14]]
   return 0;
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-struct C {
-  int x;
-  ~C() {}
-};
-
-int main() {
-  C *buffer = new C[42];
-  buffer[-(1 + sizeof(void*) / 4)].x = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-3]]
-//
-// FIXME: Currently it says "4 bytes ... left of 172-byte region",
-//        should be "8 bytes ... left of 168-byte region", see
-//        https://code.google.com/p/address-sanitizer/issues/detail?id=314
-// CHECK: [[ADDR]] is located {{.*}} bytes to the left of {{(172|176)}}-byte region
-// CHECK-LABEL: allocated by thread T0 here:
-// FIXME: The 'operator new' frame should have [].
-// CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-13]]
-  delete [] buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -11,7 +11,7 @@ int main() {
   buffer[-(1 + sizeof(void*) / 4)].x = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*operator_array_new_with_dtor_left_oob.cpp}}:[[@LINE-3]]
 //
 // FIXME: Currently it says "4 bytes ... left of 172-byte region",
 //        should be "8 bytes ... left of 168-byte region", see
@@ -20,6 +20,6 @@ int main() {
 // CHECK-LABEL: allocated by thread T0 here:
 // FIXME: The 'operator new' frame should have [].
 // CHECK-NEXT: {{#0 .* operator new}}
-// CHECK-NEXT: {{#1 .* main .*operator_array_new_with_dtor_left_oob.cc}}:[[@LINE-13]]
+// CHECK-NEXT: {{#1 .* main .*operator_array_new_with_dtor_left_oob.cpp}}:[[@LINE-13]]
   delete [] buffer;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  int *x = new int[42];
-  delete (x + 1);
-// CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed
-// CHECK:   {{#0 0x.* operator delete}}
-// CHECK:   {{#1 .* main .*operator_delete_wrong_argument.cc}}:[[@LINE-3]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cpp Mon Aug  5 09:48:12 2019
@@ -8,5 +8,5 @@ int main() {
   delete (x + 1);
 // CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed
 // CHECK:   {{#0 0x.* operator delete}}
-// CHECK:   {{#1 .* main .*operator_delete_wrong_argument.cc}}:[[@LINE-3]]
+// CHECK:   {{#1 .* main .*operator_delete_wrong_argument.cpp}}:[[@LINE-3]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  char *buffer = new char;
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_left_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 1 bytes to the left of 1-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_left_oob.cc}}:[[@LINE-8]]
-  delete buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_left_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*operator_new_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 1-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_left_oob.cc}}:[[@LINE-8]]
+// CHECK:   {{#1 .* main .*operator_new_left_oob.cpp}}:[[@LINE-8]]
   delete buffer;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  char *buffer = new char;
-  buffer[1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_right_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 1-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_right_oob.cc}}:[[@LINE-8]]
-  delete buffer;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_right_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*operator_new_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 1-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_right_oob.cc}}:[[@LINE-8]]
+// CHECK:   {{#1 .* main .*operator_new_right_oob.cpp}}:[[@LINE-8]]
   delete buffer;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-int main() {
-  char *buffer = new char;
-  delete buffer;
-  *buffer = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_uaf.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 1-byte region
-// CHECK-LABEL: freed by thread T0 here:
-// CHECK:   {{#0 .* operator delete}}
-// CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-8]]
-// CHECK-LABEL: previously allocated by thread T0 here:
-// CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-12]]
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -9,14 +9,14 @@ int main() {
   *buffer = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK:   {{#0 .* main .*operator_new_uaf.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* main .*operator_new_uaf.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 1-byte region
 // CHECK-LABEL: freed by thread T0 here:
 // CHECK:   {{#0 .* operator delete}}
-// CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-8]]
+// CHECK:   {{#1 .* main .*operator_new_uaf.cpp}}:[[@LINE-8]]
 // CHECK-LABEL: previously allocated by thread T0 here:
 // CHECK:   {{#0 .* operator new}}
-// CHECK:   {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-12]]
+// CHECK:   {{#1 .* main .*operator_new_uaf.cpp}}:[[@LINE-12]]
   return 0;
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item.cc (removed)
@@ -1,51 +0,0 @@
-// Make sure we can throw exceptions from work items executed via
-// QueueUserWorkItem.
-//
-// RUN: %clangxx_asan %s -o %t.exe
-// RUN: %run %t.exe 2>&1 | FileCheck %s
-
-#include <windows.h>
-#include <stdio.h>
-
-void ThrowAndCatch();
-
-__declspec(noinline)
-void Throw() {
-  fprintf(stderr, "Throw\n");
-// CHECK: Throw
-  throw 1;
-}
-
-void ThrowAndCatch() {
-  int local;
-  try {
-    Throw();
-  } catch(...) {
-    fprintf(stderr, "Catch\n");
-// CHECK: Catch
-  }
-}
-
-HANDLE done;
-
-DWORD CALLBACK work_item(LPVOID) {
-  ThrowAndCatch();
-  SetEvent(done);
-  return 0;
-}
-
-int main(int argc, char **argv) {
-  done = CreateEvent(0, false, false, "job is done");
-  if (!done)
-    return 1;
-  QueueUserWorkItem(&work_item, nullptr, 0);
-  unsigned wait_result = WaitForSingleObject(done, 10 * 1000);
-  if (wait_result == WAIT_ABANDONED)
-    fprintf(stderr, "Timed out\n");
-  if (wait_result != WAIT_OBJECT_0) {
-    fprintf(stderr, "Wait for work item failed\n");
-    return 2;
-  }
-  fprintf(stderr, "Done!\n");
-// CHECK: Done!
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-HANDLE done;
-
-DWORD CALLBACK work_item(LPVOID) {
-  int subscript = -1;
-  volatile char stack_buffer[42];
-  stack_buffer[subscript] = 42;
-  // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[ADDR]] thread T{{[0-9]+}}
-  // CHECK:   {{#0 .* work_item.*queue_user_work_item_report.cc}}:[[@LINE-3]]
-  SetEvent(done);
-  return 0;
-}
-
-int main(int argc, char **argv) {
-  done = CreateEvent(0, false, false, "job is done");
-  if (!done)
-    return 1;
-// CHECK-NOT: Thread T1 created
-  QueueUserWorkItem(&work_item, nullptr, 0);
-  if (WAIT_OBJECT_0 != WaitForSingleObject(done, 10 * 1000))
-    return 2;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cpp Mon Aug  5 09:48:12 2019
@@ -11,7 +11,7 @@ DWORD CALLBACK work_item(LPVOID) {
   stack_buffer[subscript] = 42;
   // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
   // CHECK: WRITE of size 1 at [[ADDR]] thread T{{[0-9]+}}
-  // CHECK:   {{#0 .* work_item.*queue_user_work_item_report.cc}}:[[@LINE-3]]
+  // CHECK:   {{#0 .* work_item.*queue_user_work_item_report.cpp}}:[[@LINE-3]]
   SetEvent(done);
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)realloc(0, 42);
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_left_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_left_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*realloc_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_left_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*realloc_left_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)realloc(0, 42);
-  buffer[42] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_right_oob.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_right_oob.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -8,10 +8,10 @@ int main() {
   buffer[42] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_right_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*realloc_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_right_oob.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*realloc_right_oob.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)realloc(0, 42);
-  free(buffer);
-  buffer[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_uaf.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
-// CHECK: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cc}}:[[@LINE-8]]
-// CHECK: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cc}}:[[@LINE-12]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cpp Mon Aug  5 09:48:12 2019
@@ -9,12 +9,12 @@ int main() {
   buffer[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*realloc_uaf.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*realloc_uaf.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 42-byte region
 // CHECK: freed by thread T0 here:
 // CHECK-NEXT: {{#0 .* free }}
-// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cpp}}:[[@LINE-8]]
 // CHECK: previously allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cc}}:[[@LINE-12]]
+// CHECK-NEXT: {{#1 .* main .*realloc_uaf.cpp}}:[[@LINE-12]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/recalloc_sanity.cc (removed)
@@ -1,37 +0,0 @@
-// RUN: %clang_cl_asan %s -o %t.exe
-// RUN: %run %t.exe 2>&1 | FileCheck %s
-// RUN: %clang_cl %s -o %t.exe
-// RUN: %run %t.exe 2>&1 | FileCheck %s
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-
-int main() {
-  void *p = calloc(1, 100);
-  assert(p);
-  void *np = _recalloc(p, 2, 100);
-  assert(np);
-  for (int i = 0; i < 2 * 100; i++) {
-    assert(((BYTE *)np)[i] == 0);
-  }
-  void *nnp = _recalloc(np, 1, 100);
-  assert(nnp);
-  for (int i = 0; i < 100; i++) {
-    assert(((BYTE *)nnp)[i] == 0);
-    ((BYTE *)nnp)[i] = 0x0d;
-  }
-  void *nnnp = _recalloc(nnp, 2, 100);
-  assert(nnnp);
-  for (int i = 0; i < 100; i++) {
-    assert(((BYTE *)nnnp)[i] == 0x0d);
-  }
-  for (int i = 100; i < 200; i++) {
-    assert(((BYTE *)nnnp)[i] == 0);
-  }
-  fprintf(stderr, "passed\n");
-  return 0;
-}
-
-// CHECK-NOT: Assertion
-// CHECK: passed
\ No newline at end of file

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=external_symbolizer_path=asdf not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-#include <dbghelp.h>
-
-#pragma comment(lib, "dbghelp")
-
-int main() {
-  // Make sure the RTL recovers from "no options enabled" dbghelp setup.
-  SymSetOptions(0);
-
-  // Make sure the RTL recovers from "fInvadeProcess=FALSE".
-  if (!SymInitialize(GetCurrentProcess(), 0, FALSE))
-    return 42;
-
-  *(volatile int*)0 = 42;
-  // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
-  // CHECK: The signal is caused by a WRITE memory access.
-  // CHECK: Hint: address points to the zero page.
-  // CHECK: {{WARNING: .*DbgHelp}}
-  // CHECK: {{WARNING: Failed to use and restart external symbolizer}}
-  // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-6]]
-  // CHECK: AddressSanitizer can not provide additional info.
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/report_after_syminitialize.cpp Mon Aug  5 09:48:12 2019
@@ -20,6 +20,6 @@ int main() {
   // CHECK: Hint: address points to the zero page.
   // CHECK: {{WARNING: .*DbgHelp}}
   // CHECK: {{WARNING: Failed to use and restart external symbolizer}}
-  // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-6]]
+  // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cpp:}}[[@LINE-6]]
   // CHECK: AddressSanitizer can not provide additional info.
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc (removed)
@@ -1,51 +0,0 @@
-// Make sure we can handle reloading the same DLL multiple times.
-// 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>
-#include <stdio.h>
-#include <string.h>
-
-extern "C" {
-#if defined(EXE)
-int main(int argc, char **argv) {
-  if (argc != 2) {
-    printf("Usage: %s [client].dll\n", argv[0]);
-    return 101;
-  }
-  const char *dll_name = argv[1];
-
-// CHECK: time to load DLL
-  printf("time to load DLL\n");
-  fflush(0);
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-  for (int i = 0; i < 30; ++i) {
-    HMODULE dll = LoadLibrary(dll_name);
-    if (dll == NULL)
-      return 3;
-
-    if (!FreeLibrary(dll))
-      return 4;
-  }
-
-// CHECK: All OK!
-  printf("All OK!\n");
-  fflush(0);
-}
-#elif defined(DLL)
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  printf("in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-#else
-# error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc (removed)
@@ -1,47 +0,0 @@
-// 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>
-#include <stdio.h>
-#include <string.h>
-
-extern "C" {
-#if defined(EXE)
-int main(int argc, char **argv) {
-  if (argc != 2) {
-    printf("Usage: %s [client].dll\n", argv[0]);
-    return 101;
-  }
-  const char *dll_name = argv[1];
-
-// CHECK: time to load DLL
-  printf("time to load DLL\n");
-  fflush(0);
-
-// On DLL load, the "in DLL\n" string is registered:
-// CHECK: Added Global{{.*}} size=19
-// CHECK: in DLL(reason=1)
-  HMODULE dll = LoadLibrary(dll_name);
-  if (dll == NULL)
-    return 3;
-
-// CHECK: in DLL(reason=0)
-// CHECK-NEXT: Removed Global{{.*}} size=19
-  if (!FreeLibrary(dll))
-    return 4;
-
-// CHECK: bye!
-  printf("bye!\n");
-  fflush(0);
-}
-#elif defined(DLL)
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  printf("in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-#else
-# error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc (removed)
@@ -1,30 +0,0 @@
-// 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
-
-#include <stdio.h>
-#include <windows.h>
-
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-
-int main() {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr = (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't RtlAllocateHeap");
-    return -1;
-  }
-
-  char *buffer;
-  buffer = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), 0, 32),
-  buffer[33] = 'a';
-  // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_double_free.cc (removed)
@@ -1,72 +0,0 @@
-// RUN: %clang_cl_asan -LD /Od -DDLL %s -Fe%t.dll
-// RUN: %clang_cl /Od -DEXE %s -Fe%te.exe
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %te.exe %t.dll 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-// REQUIRES: asan-32-bits
-// REQUIRES: asan-rtl-heap-interception
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-
-extern "C" {
-#if defined(EXE)
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-
-int main(int argc, char **argv) {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr =
-      (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't RtlAllocateHeap");
-    return -1;
-  }
-
-  auto RtlFreeHeap_ptr =
-      (FreeFunctionPtr)GetProcAddress(NtDllHandle, "RtlFreeHeap");
-  if (RtlFreeHeap_ptr == 0) {
-    puts("Couldn't get RtlFreeHeap");
-    return -1;
-  }
-
-  char *buffer;
-  buffer = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), 0, 32);
-
-  HMODULE lib = LoadLibraryA(argv[1]);
-  assert(lib != INVALID_HANDLE_VALUE);
-  assert(0 != FreeLibrary(lib));
-
-  if (!RtlFreeHeap_ptr(GetProcessHeap(), 0, buffer)) {
-    puts("Couldn't RtlFreeHeap");
-    return -1;
-  }
-  // Because this pointer was allocated pre-hooking,
-  // this will dump as a nested bug. Asan attempts to free
-  // the pointer and AV's, so the ASAN exception handler
-  // will dump as a 'nested bug'.
-  RtlFreeHeap_ptr(GetProcessHeap(), 0, buffer);
-}
-
-#elif defined(DLL)
-// This global is registered at startup.
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  fprintf(stderr, "in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: AddressSanitizer: nested bug in the same thread, aborting.
-
-#else
-#error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_dll_unload_realloc.cc (removed)
@@ -1,76 +0,0 @@
-// RUN: %clang_cl_asan -LD /Od -DDLL %s -Fe%t.dll
-// RUN: %clang_cl /Od -DEXE %s -Fe%te.exe
-// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %te.exe %t.dll 2>&1 | FileCheck %s
-// REQUIRES: asan-dynamic-runtime
-// REQUIRES: asan-32-bits
-// REQUIRES: asan-rtl-heap-interception
-
-#include <cassert>
-#include <stdio.h>
-#include <windows.h>
-
-extern "C" {
-#if defined(EXE)
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-using RtlReAllocateHeapPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID, SIZE_T);
-
-int main(int argc, char **argv) {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr =
-      (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't RtlAllocateHeap");
-    return -1;
-  }
-
-  auto RtlFreeHeap_ptr =
-      (FreeFunctionPtr)GetProcAddress(NtDllHandle, "RtlFreeHeap");
-  if (RtlFreeHeap_ptr == 0) {
-    puts("Couldn't get RtlFreeHeap");
-    return -1;
-  }
-
-  auto RtlReAllocateHeap_ptr =
-      (RtlReAllocateHeapPtr)GetProcAddress(NtDllHandle, "RtlReAllocateHeap");
-  if (RtlReAllocateHeap_ptr == 0) {
-    puts("Couldn't get rtlreallocateheap\n");
-    return -1;
-  }
-
-  char *buffer;
-  buffer = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), 0, 32);
-
-  HMODULE lib = LoadLibraryA(argv[1]);
-  assert(lib != INVALID_HANDLE_VALUE);
-  assert(0 != FreeLibrary(lib));
-
-  if (!RtlFreeHeap_ptr(GetProcessHeap(), 0, buffer)) {
-    puts("Couldn't RtlFreeHeap");
-    return -1;
-  }
-  RtlReAllocateHeap_ptr(GetProcessHeap(), 0, buffer, 100); // should dump
-}
-
-#elif defined(DLL)
-// This global is registered at startup.
-
-BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
-  fprintf(stderr, "in DLL(reason=%d)\n", (int)reason);
-  fflush(0);
-  return TRUE;
-}
-
-// CHECK: in DLL(reason=1)
-// CHECK: in DLL(reason=0)
-// CHECK: AddressSanitizer: nested bug in the same thread, aborting.
-
-#else
-#error oops!
-#endif
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc (removed)
@@ -1,45 +0,0 @@
-// 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
-
-#include <assert.h>
-#include <stdio.h>
-#include <windows.h>
-
-extern "C" int __sanitizer_get_ownership(const volatile void *p);
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-
-int main() {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr = (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't RtlAllocateHeap");
-    return -1;
-  }
-
-  auto RtlFreeHeap_ptr = (FreeFunctionPtr)GetProcAddress(NtDllHandle, "RtlFreeHeap");
-  if (RtlFreeHeap_ptr == 0) {
-    puts("Couldn't RtlFreeHeap");
-    return -1;
-  }
-
-  char *winbuf;
-  char *asanbuf;
-  winbuf = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, 32),
-  asanbuf = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), 0, 32),
-  winbuf[0] = 'a';
-  assert(!__sanitizer_get_ownership(winbuf));
-  assert(__sanitizer_get_ownership(asanbuf));
-
-  RtlFreeHeap_ptr(GetProcessHeap(), 0, winbuf);
-  RtlFreeHeap_ptr(GetProcessHeap(), 0, asanbuf);
-  puts("Okay");
-  // CHECK: Okay
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc (removed)
@@ -1,68 +0,0 @@
-// 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
-
-#include <assert.h>
-#include <stdio.h>
-#include <windows.h>
-
-using AllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, SIZE_T);
-using ReAllocateFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID, SIZE_T);
-using FreeFunctionPtr = PVOID(__stdcall *)(PVOID, ULONG, PVOID);
-
-int main() {
-  HMODULE NtDllHandle = GetModuleHandle("ntdll.dll");
-  if (!NtDllHandle) {
-    puts("Couldn't load ntdll??");
-    return -1;
-  }
-
-  auto RtlAllocateHeap_ptr = (AllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlAllocateHeap");
-  if (RtlAllocateHeap_ptr == 0) {
-    puts("Couldn't find RtlAllocateHeap");
-    return -1;
-  }
-
-  auto RtlReAllocateHeap_ptr = (ReAllocateFunctionPtr)GetProcAddress(NtDllHandle, "RtlReAllocateHeap");
-  if (RtlReAllocateHeap_ptr == 0) {
-    puts("Couldn't find RtlReAllocateHeap");
-    return -1;
-  }
-
-  char *buffer;
-  SIZE_T buffer_size = 32;
-  SIZE_T new_buffer_size = buffer_size * 2;
-
-  buffer = (char *)RtlAllocateHeap_ptr(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer_size);
-  assert(buffer != nullptr);
-  // Check that the buffer is zeroed.
-  for (SIZE_T i = 0; i < buffer_size; ++i) {
-    assert(buffer[i] == 0);
-  }
-  memset(buffer, 0xcc, buffer_size);
-
-  // Zero the newly allocated memory.
-  buffer = (char *)RtlReAllocateHeap_ptr(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer, new_buffer_size);
-  assert(buffer != nullptr);
-  // Check that the first part of the buffer still has the old contents.
-  for (SIZE_T i = 0; i < buffer_size; ++i) {
-    assert(buffer[i] == (char)0xcc);
-  }
-  // Check that the new part of the buffer is zeroed.
-  for (SIZE_T i = buffer_size; i < new_buffer_size; ++i) {
-    assert(buffer[i] == 0x0);
-  }
-
-  // Shrink the buffer back down.
-  buffer = (char *)RtlReAllocateHeap_ptr(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer, buffer_size);
-  assert(buffer != nullptr);
-  // Check that the first part of the buffer still has the old contents.
-  for (SIZE_T i = 0; i < buffer_size; ++i) {
-    assert(buffer[i] == (char)0xcc);
-  }
-
-  buffer[buffer_size + 1] = 'a';
-  // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-  // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/seh.cc (removed)
@@ -1,58 +0,0 @@
-// Make sure that ASan works with SEH in both Clang and MSVC. MSVC uses a
-// different EH personality depending on the -GS setting, so test both -GS+ and
-// -GS-.
-//
-// RUN: cl -c %s -Fo%t.obj -DCOMPILE_SEH
-// RUN: %clangxx_asan -o %t.exe %s %t.obj
-// RUN: %run %t.exe
-//
-// RUN: cl -GS- -c %s -Fo%t.obj -DCOMPILE_SEH
-// RUN: %clangxx_asan -o %t.exe %s %t.obj
-// RUN: %run %t.exe
-//
-// RUN: %clang_cl_asan %s -DCOMPILE_SEH -Fe%t.exe
-// RUN: %run %t.exe
-
-#include <windows.h>
-#include <assert.h>
-#include <stdio.h>
-
-// Should just "#include <sanitizer/asan_interface.h>" when C++ exceptions are
-// supported and we don't need to use CL.
-extern "C" bool __asan_address_is_poisoned(void *p);
-
-void ThrowAndCatch();
-
-#if defined(COMPILE_SEH)
-__declspec(noinline)
-void Throw() {
-  int local, zero = 0;
-  fprintf(stderr, "Throw:  %p\n", &local);
-  local = 5 / zero;
-}
-
-__declspec(noinline)
-void ThrowAndCatch() {
-  int local;
-  __try {
-    Throw();
-  } __except(EXCEPTION_EXECUTE_HANDLER) {
-    fprintf(stderr, "__except:  %p\n", &local);
-  }
-}
-#endif
-
-#if defined(__clang__)
-int main() {
-  char x[32];
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  ThrowAndCatch();
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  assert(!__asan_address_is_poisoned(x + 32));
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc (removed)
@@ -1,29 +0,0 @@
-// Load this DLL at the default 32-bit ASan shadow base, and test how we dump
-// the process memory layout.
-// REQUIRES: asan-32-bits
-//
-// RUN: %clang_cl_asan -DBUILD_DLL -LD %s -Fe%t_dll.dll -link -base:0x30000000 -fixed -dynamicbase:no
-// RUN: %clang_cl_asan %s -Fe%t.exe -link %t_dll.lib
-// RUN: not %run %t.exe 2>&1 | FileCheck %s
-
-#ifndef BUILD_DLL
-#include <stdio.h>
-
-extern "C" __declspec(dllimport) int test_function();
-
-int main() {
-  fprintf(stderr, "should have failed to initialize, DLL got loaded near 0x%p\n",
-          (void *)&test_function);
-}
-
-#else
-extern "C" __declspec(dllexport) int test_function() { return 0; }
-#endif
-
-// CHECK: =={{[0-9:]+}}==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
-// CHECK: =={{[0-9:]+}}==ASan shadow was supposed to be located in the [0x2fff0000-0x3fffffff] range.
-// CHECK: =={{[0-9:]+}}==Dumping process modules
-
-// CHECK-DAG: {{0x30000000-0x300.....}} {{.*}}\shadow_conflict_32.cc.tmp_dll.dll
-// CHECK-DAG: {{0x........-0x........}} {{.*}}\shadow_conflict_32.cc.tmp.exe
-// CHECK-DAG: {{0x........-0x........}} {{.*}}\ntdll.dll

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/shadow_conflict_32.cpp Mon Aug  5 09:48:12 2019
@@ -24,6 +24,6 @@ extern "C" __declspec(dllexport) int tes
 // CHECK: =={{[0-9:]+}}==ASan shadow was supposed to be located in the [0x2fff0000-0x3fffffff] range.
 // CHECK: =={{[0-9:]+}}==Dumping process modules
 
-// CHECK-DAG: {{0x30000000-0x300.....}} {{.*}}\shadow_conflict_32.cc.tmp_dll.dll
-// CHECK-DAG: {{0x........-0x........}} {{.*}}\shadow_conflict_32.cc.tmp.exe
+// CHECK-DAG: {{0x30000000-0x300.....}} {{.*}}\shadow_conflict_32.cpp.tmp_dll.dll
+// CHECK-DAG: {{0x........-0x........}} {{.*}}\shadow_conflict_32.cpp.tmp.exe
 // CHECK-DAG: {{0x........-0x........}} {{.*}}\ntdll.dll

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// REQUIRES: asan-32-bits
-
-#include <stdio.h>
-
-char bigchunk[1 << 30];
-
-int main() {
-  printf("Hello, world!\n");
-  scanf("%s", bigchunk);
-// CHECK-NOT: Hello, world!
-// CHECK: Shadow memory range interleaves with an existing memory mapping.
-// CHECK: ASan shadow was supposed to be located in the [0x2fff0000-0x{{.*}}ffff] range.
-// CHECK: Dumping process modules:
-// CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}shadow_mapping_failure
-// CHECK-DAG: 0x{{[0-9a-f]*}}-0x{{[0-9a-f]*}} {{.*}}ntdll.dll
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-
-int main() {
-  int subscript = -1;
-  char buffer[42];
-  buffer[subscript] = 42;
-// CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cc}}:[[@LINE-3]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cc}}
-// CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -9,8 +9,8 @@ int main() {
   buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cc}}
+// CHECK-NEXT: {{#0 .* main .*stack_array_left_oob.cpp}}
 // CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] underflows this variable
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-
-int main() {
-  int subscript = 42;
-  char buffer[42];
-  buffer[subscript] = 42;
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}:[[@LINE-3]]
-// CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}
-// CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] overflows this variable
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -9,8 +9,8 @@ int main() {
   buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cc}}
+// CHECK-NEXT: {{#0 .* main .*stack_array_right_oob.cpp}}
 // CHECK: 'buffer'{{.*}} <== Memory access at offset [[OFFSET]] overflows this variable
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc (removed)
@@ -1,12 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t | FileCheck %s
-
-#include <stdio.h>
-
-int main() {
-  int subscript = 1;
-  char buffer[42];
-  buffer[subscript] = 42;
-  printf("OK\n");
-// CHECK: OK
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc (removed)
@@ -1,22 +0,0 @@
-// 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;
-
-void foo() {
-  char stack_buffer[42];
-  x = &stack_buffer[13];
-}
-
-int main() {
-  foo();
-  *x = 42;
-// CHECK: AddressSanitizer: stack-use-after-return
-// CHECK: WRITE of size 1 at {{.*}} thread T0
-// CHECK-NEXT: {{#0 0x.* in main .*stack_use_after_return.cc}}:[[@LINE-3]]
-//
-// CHECK: is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 0x.* in foo.*stack_use_after_return.cc}}
-//
-// CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cpp Mon Aug  5 09:48:12 2019
@@ -13,10 +13,10 @@ int main() {
   *x = 42;
 // CHECK: AddressSanitizer: stack-use-after-return
 // CHECK: WRITE of size 1 at {{.*}} thread T0
-// CHECK-NEXT: {{#0 0x.* in main .*stack_use_after_return.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 0x.* in main .*stack_use_after_return.cpp}}:[[@LINE-3]]
 //
 // CHECK: is located in stack of thread T0 at offset [[OFFSET:.*]] in frame
-// CHECK-NEXT: {{#0 0x.* in foo.*stack_use_after_return.cc}}
+// CHECK-NEXT: {{#0 0x.* in foo.*stack_use_after_return.cpp}}
 //
 // CHECK: 'stack_buffer'{{.*}} <== Memory access at offset [[OFFSET]] is inside this variable
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc (removed)
@@ -1,22 +0,0 @@
-// Make sure symbolization works even if the path to the .exe file changes.
-// RUN: mkdir %t || true
-// 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
-// RUN: not %run %t2/symbols_path.exe 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)malloc(42);
-  buffer[-1] = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*symbols_path.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* malloc}}
-// CHECK-NEXT: {{#1 .* main .*symbols_path.cc}}:[[@LINE-8]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cpp Mon Aug  5 09:48:12 2019
@@ -13,10 +13,10 @@ int main() {
   buffer[-1] = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*symbols_path.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*symbols_path.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* malloc}}
-// CHECK-NEXT: {{#1 .* main .*symbols_path.cc}}:[[@LINE-8]]
+// CHECK-NEXT: {{#1 .* main .*symbols_path.cpp}}:[[@LINE-8]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc(void *) {
-  volatile char stack_buffer[42];
-  for (int i = 0; i < sizeof(stack_buffer); ++i)
-    stack_buffer[i] = 42;
-  return 0x42;
-}
-
-int main() {
-  DWORD exitcode;
-  HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
-  if (thr == 0)
-    return 1;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 2;
-
-  GetExitCodeThread(thr, &exitcode);
-  if (exitcode != 0x42)
-    return 3;
-  CloseHandle(thr);
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc(void *) {
-  int subscript = -1;
-  volatile char stack_buffer[42];
-  stack_buffer[subscript] = 42;
-// CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc.*thread_stack_array_left_oob.cc}}:[[@LINE-3]]
-// CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
-// CHECK:   thread_proc
-  return 0;
-}
-
-int main() {
-  HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
-// CHECK: Thread T1 created by T0 here:
-// CHECK:   {{#[01] .* main .*thread_stack_array_left_oob.cc}}:[[@LINE-2]]
-
-  // A failure to create a thread should fail the test!
-  if (thr == 0) return 0;
-
-  WaitForSingleObject(thr, INFINITE);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cpp Mon Aug  5 09:48:12 2019
@@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) {
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc.*thread_stack_array_left_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* thread_proc.*thread_stack_array_left_oob.cpp}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
 // CHECK:   thread_proc
   return 0;
@@ -18,7 +18,7 @@ DWORD WINAPI thread_proc(void *) {
 int main() {
   HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
 // CHECK: Thread T1 created by T0 here:
-// CHECK:   {{#[01] .* main .*thread_stack_array_left_oob.cc}}:[[@LINE-2]]
+// CHECK:   {{#[01] .* main .*thread_stack_array_left_oob.cpp}}:[[@LINE-2]]
 
   // A failure to create a thread should fail the test!
   if (thr == 0) return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc(void *) {
-  int subscript = 42;
-  volatile char stack_buffer[42];
-  stack_buffer[subscript] = 42;
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc.*thread_stack_array_right_oob.cc}}:[[@LINE-3]]
-// CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
-// CHECK:   thread_proc
-  return 0;
-}
-
-int main(void) {
-  HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
-// CHECK: Thread T1 created by T0 here:
-// CHECK:   {{#[01] .* main .*thread_stack_array_right_oob.cc}}:[[@LINE-2]]
-
-  // A failure to create a thread should fail the test!
-  if (thr == 0) return 0;
-
-  WaitForSingleObject(thr, INFINITE);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cpp Mon Aug  5 09:48:12 2019
@@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) {
   stack_buffer[subscript] = 42;
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T1
-// CHECK:   {{#0 .* thread_proc.*thread_stack_array_right_oob.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 .* thread_proc.*thread_stack_array_right_oob.cpp}}:[[@LINE-3]]
 // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame
 // CHECK:   thread_proc
   return 0;
@@ -18,7 +18,7 @@ DWORD WINAPI thread_proc(void *) {
 int main(void) {
   HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
 // CHECK: Thread T1 created by T0 here:
-// CHECK:   {{#[01] .* main .*thread_stack_array_right_oob.cc}}:[[@LINE-2]]
+// CHECK:   {{#[01] .* main .*thread_stack_array_right_oob.cpp}}:[[@LINE-2]]
 
   // A failure to create a thread should fail the test!
   if (thr == 0) return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc (removed)
@@ -1,37 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc_1(void *) {
-  volatile int x, y, z;
-  x = 1;
-  y = 2;
-  z = 3;
-  return 0;
-}
-
-DWORD WINAPI thread_proc_2(void *) {
-  volatile char stack_buffer[42];
-  for (int i = 0; i < sizeof(stack_buffer); ++i)
-    stack_buffer[i] = 42;
-  return 0;
-}
-
-int main(void) {
-  HANDLE thr = NULL;
-
-  thr = CreateThread(NULL, 0, thread_proc_1, NULL, 0, NULL);
-  if (thr == 0)
-    return 1;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 2;
-
-  thr = CreateThread(NULL, 0, thread_proc_2, NULL, 0, NULL);
-  if (thr == 0)
-    return 3;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 4;
-  CloseHandle(thr);
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc(void *) {
-  volatile char stack_buffer[42];
-  for (int i = 0; i < sizeof(stack_buffer); ++i)
-    stack_buffer[i] = 42;
-  return 0;
-}
-
-int main(void) {
-  for (int iter = 0; iter < 1024; ++iter) {
-    const int NUM_THREADS = 8;
-    HANDLE thr[NUM_THREADS];
-    for (int i = 0; i < NUM_THREADS; ++i) {
-      thr[i] = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL);
-      if (thr[i] == 0)
-        return 1;
-    }
-    for (int i = 0; i < NUM_THREADS; ++i) {
-      if (WAIT_OBJECT_0 != WaitForSingleObject(thr[i], INFINITE))
-        return 2;
-      CloseHandle(thr[i]);
-    }
-  }
-  return 0;
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-#include <windows.h>
-
-DWORD WINAPI thread_proc(void *) {
-  volatile char stack_buffer[42];
-  for (int i = 0; i < sizeof(stack_buffer); ++i)
-    stack_buffer[i] = 42;
-  return 0x42;
-}
-
-int main() {
-  DWORD exitcode;
-  HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, CREATE_SUSPENDED, NULL);
-  ResumeThread(thr);
-  if (thr == 0)
-    return 1;
-  if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE))
-    return 2;
-
-  GetExitCodeThread(thr, &exitcode);
-  if (exitcode != 0x42)
-    return 3;
-  CloseHandle(thr);
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/tls_init.cc (removed)
@@ -1,51 +0,0 @@
-// RUN: %clang_cl_asan %s -Fe%t.exe /MD
-// RUN: %run %t.exe | FileCheck %s
-
-// CHECK: my_thread_callback
-// CHECK: ran_before_main: 1
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-
-#pragma comment (lib, "dbghelp")
-
-static bool ran_before_main = false;
-
-extern "C" void __asan_init(void);
-
-static void NTAPI /*__attribute__((no_sanitize_address))*/
-my_thread_callback(PVOID module, DWORD reason, PVOID reserved) {
-  ran_before_main = true;
-  static const char str[] = "my_thread_callback\n";
-
-  // Fail the test if we aren't called for the expected reason or we can't write
-  // stdout.
-  if (reason != DLL_PROCESS_ATTACH)
-    return;
-  HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
-  if (!out || out == INVALID_HANDLE_VALUE)
-    return;
-
-  DWORD written = 0;
-  WriteFile(out, &str[0], sizeof(str), &written, NULL);
-}
-
-extern "C" {
-#pragma const_seg(".CRT$XLC")
-extern const PIMAGE_TLS_CALLBACK p_thread_callback;
-const PIMAGE_TLS_CALLBACK p_thread_callback = my_thread_callback;
-#pragma const_seg()
-}
-
-#ifdef _WIN64
-#pragma comment(linker, "/INCLUDE:_tls_used")
-#pragma comment(linker, "/INCLUDE:p_thread_callback")
-#else
-#pragma comment(linker, "/INCLUDE:__tls_used")
-#pragma comment(linker, "/INCLUDE:_p_thread_callback")
-#endif
-
-int main() {
-  printf("ran_before_main: %d\n", ran_before_main);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc (removed)
@@ -1,25 +0,0 @@
-// When we link a binary without the -debug flag, ASan should print out VAs
-// instead of RVAs. The frames for main and do_uaf should be above 0x400000,
-// which is the default image base of an executable.
-
-// RUN: rm -f %t.pdb
-// RUN: %clangxx_asan -c -O2 %s -o %t.obj
-// RUN: link /nologo /OUT:%t.exe %t.obj %asan_lib %asan_cxx_lib
-// RUN: not %run %t.exe 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-#include <stdio.h>
-int __attribute__((noinline)) do_uaf(void);
-int main() {
-  int r = do_uaf();
-  printf("r: %d\n", r);
-  return r;
-}
-int do_uaf(void) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: AddressSanitizer: heap-use-after-free
-  // CHECK: #0 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cc.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
-  // CHECK: #1 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cc.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/unsymbolized.cpp Mon Aug  5 09:48:12 2019
@@ -20,6 +20,6 @@ int do_uaf(void) {
   free(x);
   return x[5];
   // CHECK: AddressSanitizer: heap-use-after-free
-  // CHECK: #0 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cc.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
-  // CHECK: #1 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cc.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
+  // CHECK: #0 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cpp.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
+  // CHECK: #1 {{0x[a-f0-9]+ \(.*[\\/]unsymbolized.cpp.*.exe\+(0x40|0x14000)[a-f0-9]{4}\)}}
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-#include <malloc.h>
-
-int main() {
-  char *buffer = (char*)realloc(0, 32),
-       *stale = buffer;
-  buffer = (char*)realloc(buffer, 64);
-  // The 'stale' may now point to a free'd memory.
-  stale[0] = 42;
-// CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*use_after_realloc.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes inside of 32-byte region
-// CHECK: freed by thread T0 here:
-// CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cc}}:[[@LINE-9]]
-// CHECK: previously allocated by thread T0 here:
-// CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cc}}:[[@LINE-14]]
-  free(buffer);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cpp Mon Aug  5 09:48:12 2019
@@ -11,13 +11,13 @@ int main() {
   stale[0] = 42;
 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 1 at [[ADDR]] thread T0
-// CHECK-NEXT: {{#0 .* main .*use_after_realloc.cc}}:[[@LINE-3]]
+// CHECK-NEXT: {{#0 .* main .*use_after_realloc.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes inside of 32-byte region
 // CHECK: freed by thread T0 here:
 // CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cc}}:[[@LINE-9]]
+// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cpp}}:[[@LINE-9]]
 // CHECK: previously allocated by thread T0 here:
 // CHECK-NEXT: {{#0 .* realloc }}
-// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cc}}:[[@LINE-14]]
+// CHECK-NEXT: {{#1 .* main .*use_after_realloc.cpp}}:[[@LINE-14]]
   free(buffer);
 }

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/use_after_return_linkage.cc (removed)
@@ -1,12 +0,0 @@
-// Make sure LIBCMT doesn't accidentally get added to the list of DEFAULTLIB
-// directives.  REQUIRES: asan-dynamic-runtime
-// RUN: %clang_cl_asan -LD %s | FileCheck %s
-// CHECK: Creating library
-// CHECK-NOT: LIBCMT
-
-void foo(int *p) { *p = 42; }
-
-__declspec(dllexport) void bar() {
-  int x;
-  foo(&x);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc (removed)
@@ -1,36 +0,0 @@
-// 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.
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=ASAN
-
-// This test exits zero when its unhandled exception filter is set. ASan should
-// not disturb it when handle_segv=0.
-
-// USER: in main
-// USER: in SEHHandler
-
-// ASAN: in main
-// ASAN: ERROR: AddressSanitizer: access-violation
-
-#include <windows.h>
-#include <stdio.h>
-
-static long WINAPI SEHHandler(EXCEPTION_POINTERS *info) {
-  DWORD exception_code = info->ExceptionRecord->ExceptionCode;
-  if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
-    fprintf(stderr, "in SEHHandler\n");
-    fflush(stderr);
-    TerminateProcess(GetCurrentProcess(), 0);
-  }
-  return EXCEPTION_CONTINUE_SEARCH;
-}
-
-int main() {
-  SetUnhandledExceptionFilter(SEHHandler);
-  fprintf(stderr, "in main\n");
-  fflush(stderr);
-
-  volatile int *p = nullptr;
-  *p = 42;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc (removed)
@@ -1,7 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: %run %t
-
-// Just make sure we can parse <windows.h>
-#include <windows.h>
-
-int main() {}

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-class Parent {
- public:
-  int field;
-};
-
-class Child : public Parent {
- public:
-  int extra_field;
-};
-
-int main(void) {
-  Parent *p = new Parent;
-  Child *c = (Child*)p;  // Intentional error here!
-  c->extra_field = 42;
-// CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK:   {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_heap.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located 0 bytes to the right of 4-byte region
-// CHECK: allocated by thread T0 here:
-// CHECK:   #0 {{.*}} operator new
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp Mon Aug  5 09:48:12 2019
@@ -17,7 +17,7 @@ int main(void) {
   c->extra_field = 42;
 // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK:   {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_heap.cc}}:[[@LINE-3]]
+// CHECK:   {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_heap.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located 0 bytes to the right of 4-byte region
 // CHECK: allocated by thread T0 here:
 // CHECK:   #0 {{.*}} operator new

Removed: compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clang_cl_asan -Od %s -Fe%t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-class Parent {
- public:
-  int field;
-};
-
-class Child : public Parent {
- public:
-  int extra_field;
-};
-
-int main(void) {
-  Parent p;
-  Child *c = (Child*)&p;  // Intentional error here!
-  c->extra_field = 42;
-// CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT:  {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_stack.cc}}:[[@LINE-3]]
-// CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:[0-9]+]] in frame
-// CHECK-NEXT:  {{#0 0x[0-9a-f]* in main }}
-// CHECK:  'p'{{.*}} <== Memory access at offset [[OFFSET]] overflows this variable
-  return 0;
-}
-

Copied: compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp?p2=compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp&p1=compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cpp Mon Aug  5 09:48:12 2019
@@ -17,7 +17,7 @@ int main(void) {
   c->extra_field = 42;
 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
 // CHECK: WRITE of size 4 at [[ADDR]] thread T0
-// CHECK-NEXT:  {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_stack.cc}}:[[@LINE-3]]
+// CHECK-NEXT:  {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_stack.cpp}}:[[@LINE-3]]
 // CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:[0-9]+]] in frame
 // CHECK-NEXT:  {{#0 0x[0-9a-f]* in main }}
 // CHECK:  'p'{{.*}} <== Memory access at offset [[OFFSET]] overflows this variable

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_big_alignment.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(128)));
-  assert(!(reinterpret_cast<long>(str) & 127L));
-  str[index] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}
-
-int main(int argc, char **argv) {
-  foo(10, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_constant_size.cc (removed)
@@ -1,54 +0,0 @@
-// Regression test for https://github.com/google/sanitizers/issues/691
-
-// RUN: %clangxx_asan -O0 %s -o %t -fstack-protector
-// RUN: %run %t 1 2>&1 | FileCheck %s
-// RUN: %run %t 2 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-// MSVC provides _alloca instead of alloca.
-#if defined(_MSC_VER) && !defined(alloca)
-# define alloca _alloca
-#endif
-
-#if defined(__sun__) && defined(__svr4__)
-#include <alloca.h>
-#endif
-
-
-void f1_alloca() {
-  char *dynamic_buffer = (char *)alloca(200);
-  fprintf(stderr, "dynamic_buffer = %p\n", dynamic_buffer);
-  memset(dynamic_buffer, 'y', 200);
-  return;
-}
-
-static const int kDynamicArraySize = 200;
-
-void f1_vla() {
-  char dynamic_buffer[kDynamicArraySize];
-  fprintf(stderr, "dynamic_buffer = %p\n", dynamic_buffer);
-  memset(dynamic_buffer, 'y', kDynamicArraySize);
-  return;
-}
-
-void f2() {
-  char buf[1024];
-  memset(buf, 'x', 1024);
-}
-
-int main(int argc, const char *argv[]) {
-  if (!strcmp(argv[1], "1")) {
-    f1_alloca();
-  } else if (!strcmp(argv[1], "2")) {
-    f1_vla();
-  }
-  f2();
-  fprintf(stderr, "Done.\n");
-  return 0;
-}
-
-// CHECK-NOT: ERROR: AddressSanitizer
-// CHECK: Done.

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_detect_custom_size_.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-#include <assert.h>
-
-struct A {
-  char a[3];
-  int b[3];
-};
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile struct A str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  str[index].a[0] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}
-
-int main(int argc, char **argv) {
-  foo(10, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_instruments_all_paddings.cc (removed)
@@ -1,24 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: %clangxx_asan -O3 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: %run %t 2>&1
-//
-
-#include "sanitizer/asan_interface.h"
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  char *q = (char *)__asan_region_is_poisoned((char *)str, 64);
-  assert(q && ((q - str) == index));
-}
-
-int main(int argc, char **argv) {
-  for (int i = 1; i < 33; ++i)
-    foo(i, i);
-
-  for (int i = 1; i < 33; ++i)
-    foo(i, i);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_loop_unpoisoning.cc (removed)
@@ -1,42 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: %run %t 2>&1
-//
-// REQUIRES: stable-runtime
-
-// This testcase checks that allocas and VLAs inside loop are correctly unpoisoned.
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include "sanitizer/asan_interface.h"
-
-// MSVC provides _alloca instead of alloca.
-#if defined(_MSC_VER) && !defined(alloca)
-# define alloca _alloca
-#endif
-
-#if defined(__sun__) && defined(__svr4__)
-#include <alloca.h>
-#endif
-
-void *top, *bot;
-
-__attribute__((noinline)) void foo(int len) {
-  char x;
-  top = &x;
-  char array[len];  // NOLINT
-  assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
-  alloca(len);
-  for (int i = 0; i < 32; ++i) {
-    char array[i];  // NOLINT
-    bot = alloca(i);
-    assert(!(reinterpret_cast<uintptr_t>(bot) & 31L));
-  }
-}
-
-int main(int argc, char **argv) {
-  foo(32);
-  void *q = __asan_region_is_poisoned(bot, (char *)top - (char *)bot);
-  assert(!q);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_overflow_partial.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  str[index] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}
-
-int main(int argc, char **argv) {
-  foo(10, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_overflow_right.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  str[index] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}
-
-int main(int argc, char **argv) {
-  foo(33, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_safe_access.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: %run %t 2>&1
-//
-
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  str[index] = '1';
-}
-
-int main(int argc, char **argv) {
-  foo(4, 5);
-  foo(39, 40);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_underflow_left.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-#include <assert.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  volatile char str[len] __attribute__((aligned(32)));
-  assert(!(reinterpret_cast<long>(str) & 31L));
-  str[index] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-}
-
-int main(int argc, char **argv) {
-  foo(-1, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/alloca_vla_interact.cc (removed)
@@ -1,49 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: %run %t 2>&1
-//
-// REQUIRES: stable-runtime
-
-// This testcase checks correct interaction between VLAs and allocas.
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include "sanitizer/asan_interface.h"
-
-// MSVC provides _alloca instead of alloca.
-#if defined(_MSC_VER) && !defined(alloca)
-# define alloca _alloca
-#endif
-
-#if defined(__sun__) && defined(__svr4__)
-#include <alloca.h>
-#endif
-
-#define RZ 32
-
-__attribute__((noinline)) void foo(int len) {
-  char *top, *bot;
-  // This alloca call should live until the end of foo.
-  char *alloca1 = (char *)alloca(len);
-  assert(!(reinterpret_cast<uintptr_t>(alloca1) & 31L));
-  // This should be first poisoned address after loop.
-  top = alloca1 - RZ;
-  for (int i = 0; i < 32; ++i) {
-    // Check that previous alloca was unpoisoned at the end of iteration.
-    if (i) assert(!__asan_region_is_poisoned(bot, 96));
-    // VLA is unpoisoned at the end of iteration.
-    volatile char array[i];
-    assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
-    // Alloca is unpoisoned at the end of iteration,
-    // because dominated by VLA.
-    bot = (char *)alloca(i) - RZ;
-  }
-  // Check that all allocas from loop were unpoisoned correctly.
-  void *q = __asan_region_is_poisoned(bot, (char *)top - (char *)bot + 1);
-  assert(q == top);
-}
-
-int main(int argc, char **argv) {
-  foo(32);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clangxx_asan -coverage -O0 %s -o %t
-// RUN: %env_asan_opts=check_initialization_order=1 %run %t 2>&1 | FileCheck %s
-
-// We don't really support running tests using profile runtime on Windows.
-// UNSUPPORTED: windows-msvc
-
-#include <stdio.h>
-int foo() { return 1; }
-int XXX = foo();
-int main() {
-  printf("PASS\n");
-// CHECK: PASS
-}

Removed: compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/asan_options-help.cc (removed)
@@ -1,9 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=help=1 %run %t 2>&1 | FileCheck %s
-
-int main() {
-}
-
-// CHECK: Available flags for AddressSanitizer:
-// CHECK-DAG: handle_segv
-// CHECK-DAG: check_initialization_order

Removed: compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/atexit_stats.cc (removed)
@@ -1,18 +0,0 @@
-// Make sure we report atexit stats.
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: %env_asan_opts=atexit=1:print_stats=1 %run %t 2>&1 | FileCheck %s
-//
-// No atexit output in older versions of Android due to
-// https://code.google.com/p/address-sanitizer/issues/detail?id=263
-// UNSUPPORTED: android
-
-#include <stdlib.h>
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
-#include <malloc.h>
-#endif
-int *p1 = (int*)malloc(900);
-int *p2 = (int*)malloc(90000);
-int *p3 = (int*)malloc(9000000);
-int main() { }
-
-// CHECK: AddressSanitizer exit stats:

Removed: compiler-rt/trunk/test/asan/TestCases/blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/blacklist.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/blacklist.cc (removed)
@@ -1,38 +0,0 @@
-// Test the blacklist functionality of ASan
-
-// RUN: echo "fun:*brokenFunction*" > %tmp
-// RUN: echo "global:*badGlobal*" >> %tmp
-// RUN: echo "src:*blacklist-extra.cc" >> %tmp
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O0 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O1 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O2 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O3 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
-
-// badGlobal is accessed improperly, but we blacklisted it. Align
-// it to make sure memory past the end of badGlobal will be in
-// the same page.
-__attribute__((aligned(16))) int badGlobal;
-int readBadGlobal() {
-  return (&badGlobal)[1];
-}
-
-// A function which is broken, but excluded in the blacklist.
-int brokenFunction(int argc) {
-  char x[10] = {0};
-  return x[argc * 10];  // BOOM
-}
-
-// This function is defined in Helpers/blacklist-extra.cc, a source file which
-// is blacklisted by name
-int externalBrokenFunction(int x);
-
-int main(int argc, char **argv) {
-  brokenFunction(argc);
-  int x = readBadGlobal();
-  externalBrokenFunction(argc);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/blacklist.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/blacklist.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/blacklist.cpp?p2=compiler-rt/trunk/test/asan/TestCases/blacklist.cpp&p1=compiler-rt/trunk/test/asan/TestCases/blacklist.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/blacklist.cpp Mon Aug  5 09:48:12 2019
@@ -2,15 +2,15 @@
 
 // RUN: echo "fun:*brokenFunction*" > %tmp
 // RUN: echo "global:*badGlobal*" >> %tmp
-// RUN: echo "src:*blacklist-extra.cc" >> %tmp
+// RUN: echo "src:*blacklist-extra.cpp" >> %tmp
 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O0 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
+// RUN: %p/Helpers/blacklist-extra.cpp && %run %t 2>&1
 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O1 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
+// RUN: %p/Helpers/blacklist-extra.cpp && %run %t 2>&1
 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O2 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
+// RUN: %p/Helpers/blacklist-extra.cpp && %run %t 2>&1
 // RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O3 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %run %t 2>&1
+// RUN: %p/Helpers/blacklist-extra.cpp && %run %t 2>&1
 
 // badGlobal is accessed improperly, but we blacklisted it. Align
 // it to make sure memory past the end of badGlobal will be in
@@ -26,7 +26,7 @@ int brokenFunction(int argc) {
   return x[argc * 10];  // BOOM
 }
 
-// This function is defined in Helpers/blacklist-extra.cc, a source file which
+// This function is defined in Helpers/blacklist-extra.cpp, a source file which
 // is blacklisted by name
 int externalBrokenFunction(int x);
 

Removed: compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  void *p = calloc(-1, 1000);
-  // CHECK: {{ERROR: AddressSanitizer: calloc parameters overflow: count \* size \(.* \* 1000\) cannot be represented in type size_t}}
-  // CHECK: {{#0 0x.* in .*calloc}}
-  // CHECK: {{#1 0x.* in main .*calloc-overflow.cc:}}[[@LINE-3]]
-  // CHECK: SUMMARY: AddressSanitizer: calloc-overflow
-
-  printf("calloc returned: %zu\n", (size_t)p);
-  // CHECK-NULL: calloc returned: 0
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/calloc-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -11,7 +11,7 @@ int main() {
   void *p = calloc(-1, 1000);
   // CHECK: {{ERROR: AddressSanitizer: calloc parameters overflow: count \* size \(.* \* 1000\) cannot be represented in type size_t}}
   // CHECK: {{#0 0x.* in .*calloc}}
-  // CHECK: {{#1 0x.* in main .*calloc-overflow.cc:}}[[@LINE-3]]
+  // CHECK: {{#1 0x.* in main .*calloc-overflow.cpp:}}[[@LINE-3]]
   // CHECK: SUMMARY: AddressSanitizer: calloc-overflow
 
   printf("calloc returned: %zu\n", (size_t)p);

Removed: compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/contiguous_container.cc (removed)
@@ -1,83 +0,0 @@
-// RUN: %clangxx_asan -fexceptions -O %s -o %t && %run %t
-//
-// Test __sanitizer_annotate_contiguous_container.
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <sanitizer/asan_interface.h>
-
-void TestContainer(size_t capacity) {
-  char *beg = new char[capacity];
-  char *end = beg + capacity;
-  char *mid = beg + capacity;
-  char *old_mid = 0;
-
-  for (int i = 0; i < 10000; i++) {
-    size_t size = rand() % (capacity + 1);
-    assert(size <= capacity);
-    old_mid = mid;
-    mid = beg + size;
-    __sanitizer_annotate_contiguous_container(beg, end, old_mid, mid);
-
-    for (size_t idx = 0; idx < size; idx++)
-        assert(!__asan_address_is_poisoned(beg + idx));
-    for (size_t idx = size; idx < capacity; idx++)
-        assert(__asan_address_is_poisoned(beg + idx));
-    assert(__sanitizer_verify_contiguous_container(beg, mid, end));
-    assert(NULL ==
-           __sanitizer_contiguous_container_find_bad_address(beg, mid, end));
-    if (mid != beg) {
-      assert(!__sanitizer_verify_contiguous_container(beg, mid - 1, end));
-      assert(mid - 1 == __sanitizer_contiguous_container_find_bad_address(
-                            beg, mid - 1, end));
-    }
-    if (mid != end) {
-      assert(!__sanitizer_verify_contiguous_container(beg, mid + 1, end));
-      assert(mid == __sanitizer_contiguous_container_find_bad_address(
-                        beg, mid + 1, end));
-    }
-  }
-
-  // Don't forget to unpoison the whole thing before destroing/reallocating.
-  __sanitizer_annotate_contiguous_container(beg, end, mid, end);
-  for (size_t idx = 0; idx < capacity; idx++)
-    assert(!__asan_address_is_poisoned(beg + idx));
-  delete[] beg;
-}
-
-__attribute__((noinline))
-void Throw() { throw 1; }
-
-__attribute__((noinline))
-void ThrowAndCatch() {
-  try {
-    Throw();
-  } catch(...) {
-  }
-}
-
-void TestThrow() {
-  char x[32];
-  __sanitizer_annotate_contiguous_container(x, x + 32, x + 32, x + 14);
-  assert(!__asan_address_is_poisoned(x + 13));
-  assert(__asan_address_is_poisoned(x + 14));
-  ThrowAndCatch();
-  assert(!__asan_address_is_poisoned(x + 13));
-  // FIXME: invert the assertion below once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  // This assertion works only w/o UAR.
-  if (!__asan_get_current_fake_stack())
-    assert(!__asan_address_is_poisoned(x + 14));
-  __sanitizer_annotate_contiguous_container(x, x + 32, x + 14, x + 32);
-  assert(!__asan_address_is_poisoned(x + 13));
-  assert(!__asan_address_is_poisoned(x + 14));
-}
-
-int main(int argc, char **argv) {
-  int n = argc == 1 ? 128 : atoi(argv[1]);
-  for (int i = 0; i <= n; i++)
-    TestContainer(i);
-  TestThrow();
-}

Removed: compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/contiguous_container_crash.cc (removed)
@@ -1,53 +0,0 @@
-// RUN: %clangxx_asan -O %s -o %t
-// RUN: not %run %t crash 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD-BOUNDS %s
-// RUN: not %run %t bad-alignment 2>&1 | FileCheck --check-prefix=CHECK-BAD-ALIGNMENT %s
-// RUN: %env_asan_opts=detect_container_overflow=0 %run %t crash
-//
-// Test crash due to __sanitizer_annotate_contiguous_container.
-
-#include <assert.h>
-#include <string.h>
-
-extern "C" {
-void __sanitizer_annotate_contiguous_container(const void *beg, const void *end,
-                                               const void *old_mid,
-                                               const void *new_mid);
-}  // extern "C"
-
-static volatile int one = 1;
-
-int TestCrash() {
-  long t[100];
-  t[60] = 0;
-  __sanitizer_annotate_contiguous_container(&t[0], &t[0] + 100, &t[0] + 100,
-                                            &t[0] + 50);
-// CHECK-CRASH: AddressSanitizer: container-overflow
-// CHECK-CRASH: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0
-  return (int)t[60 * one];  // Touches the poisoned memory.
-}
-
-void BadBounds() {
-  long t[100];
-// CHECK-BAD-BOUNDS: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container
-  __sanitizer_annotate_contiguous_container(&t[0], &t[0] + 100, &t[0] + 101,
-                                            &t[0] + 50);
-}
-
-void BadAlignment() {
-  int t[100];
-// CHECK-BAD-ALIGNMENT: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container
-// CHECK-BAD-ALIGNMENT: ERROR: beg is not aligned by {{[0-9]+}}
-  __sanitizer_annotate_contiguous_container(&t[1], &t[0] + 100, &t[1] + 10,
-                                            &t[0] + 50);
-}
-
-int main(int argc, char **argv) {
-  assert(argc == 2);
-  if (!strcmp(argv[1], "crash"))
-    return TestCrash();
-  else if (!strcmp(argv[1], "bad-bounds"))
-    BadBounds();
-  else if (!strcmp(argv[1], "bad-alignment"))
-    BadAlignment();
-}

Removed: compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/coverage-and-lsan.cc (removed)
@@ -1,20 +0,0 @@
-// Make sure coverage is dumped even if there are reported leaks.
-//
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t
-//
-// RUN: rm -rf %t-dir
-//
-// RUN: mkdir -p %t-dir
-// RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir:verbosity=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %sancov print %t-dir/*.sancov 2>&1
-//
-// REQUIRES: leak-detection
-
-int *g = new int;
-int main(int argc, char **argv) {
-  g = 0;
-  return 0;
-}
-
-// CHECK: LeakSanitizer: detected memory leaks
-// CHECK: SanitizerCoverage: {{.*}}PCs written

Removed: compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/coverage-disabled.cc (removed)
@@ -1,15 +0,0 @@
-// Test that no data is collected without a runtime flag.
-//
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-//
-// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
-//
-// RUN: %env_asan_opts=coverage_direct=0:coverage_dir='"%t-dir"':verbosity=1 %run %t
-// RUN: not %sancov print %t-dir/*.sancov 2>&1
-//
-// UNSUPPORTED: android
-
-int main(int argc, char **argv) {
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/coverage-trace-pc.cc (removed)
@@ -1,31 +0,0 @@
-// Test -fsanitize-coverage=edge,indirect-call,trace-pc
-// RUN: %clangxx_asan -O0 -DTRACE_RT %s -o %t-rt.o -c
-// RUN: %clangxx_asan -O0 -fsanitize-coverage=edge,trace-pc,indirect-calls %s -o %t %t-rt.o
-// RUN: %run %t
-#ifdef TRACE_RT
-int pc_count;
-void *last_callee;
-extern "C" void __sanitizer_cov_trace_pc() {
-  pc_count++;
-}
-extern "C" void __sanitizer_cov_trace_pc_indir(void *callee) {
-  last_callee = callee;
-}
-#else
-#include <stdio.h>
-#include <assert.h>
-extern int pc_count;
-extern void *last_callee;
-
-__attribute__((noinline)) void foo() { printf("foo\n"); }
-__attribute__((noinline)) void bar() { printf("bar\n"); }
-
-int main(int argc, char **argv) {
-  void (*f)(void) = argc ? foo : bar;
-  int c1 = pc_count;
-  f();
-  int c2 = pc_count;
-  assert(c1 < c2);
-  assert(last_callee == foo);
-}
-#endif

Removed: compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_double_free.cc (removed)
@@ -1,53 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-// FIXME: Doesn't work with DLLs
-// XFAIL: win32-dynamic-asan
-
-// If we use %p with MSVC, it comes out all upper case. Use %08x to get
-// lowercase hex.
-#ifdef _MSC_VER
-# ifdef _WIN64
-#  define PTR_FMT "0x%08llx"
-# else
-#  define PTR_FMT "0x%08x"
-# endif
-// Solaris libc omits the leading 0x.
-#elif defined(__sun__) && defined(__svr4__)
-# define PTR_FMT "0x%p"
-#else
-# define PTR_FMT "%p"
-#endif
-
-char *heap_ptr;
-
-int main() {
-  // Disable stderr buffering. Needed on Windows.
-  setvbuf(stderr, NULL, _IONBF, 0);
-
-  heap_ptr = (char *)malloc(10);
-  fprintf(stderr, "heap_ptr: " PTR_FMT "\n", heap_ptr);
-  // CHECK: heap_ptr: 0x[[ADDR:[0-9a-f]+]]
-
-  free(heap_ptr);
-  free(heap_ptr);  // BOOM
-  return 0;
-}
-
-void __asan_on_error() {
-  int present = __asan_report_present();
-  void *addr = __asan_get_report_address();
-  const char *description = __asan_get_report_description();
-
-  fprintf(stderr, "%s\n", (present == 1) ? "report present" : "");
-  // CHECK: report present
-  fprintf(stderr, "addr: " PTR_FMT "\n", addr);
-  // CHECK: addr: {{0x0*}}[[ADDR]]
-  fprintf(stderr, "description: %s\n", description);
-  // CHECK: description: double-free
-}
-
-// CHECK: AddressSanitizer: attempting double-free on {{0x0*}}[[ADDR]] in thread T0

Removed: compiler-rt/trunk/test/asan/TestCases/debug_locate.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_locate.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_locate.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_locate.cc (removed)
@@ -1,80 +0,0 @@
-// Checks the ASan memory address type debugging API, makes sure it returns
-// the correct memory type for heap, stack, global and shadow addresses and
-// that it correctly finds out which region (and name and size) the address
-// belongs to.
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1
-
-#include <assert.h>
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int global_var;
-
-int main() {
-  int local_var;
-  char *heap_ptr = (char *)malloc(10);
-
-  char name[100];
-  void *region_address;
-  size_t region_size;
-  const char *type;
-
-  type = __asan_locate_address(&global_var, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(name, "global_var"));
-  assert(0 == strcmp(type, "global"));
-  assert(region_address == &global_var);
-  assert(region_size == sizeof(global_var));
-
-  type = __asan_locate_address((char *)(&global_var)+1, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(name, "global_var"));
-  assert(0 == strcmp(type, "global"));
-  assert(region_address == &global_var);
-  assert(region_size == sizeof(global_var));
-
-  type = __asan_locate_address(&local_var, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(name, "local_var"));
-  assert(0 == strcmp(type, "stack"));
-  assert(region_address == &local_var);
-  assert(region_size == sizeof(local_var));
-
-  type = __asan_locate_address((char *)(&local_var)+1, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(name, "local_var"));
-  assert(0 == strcmp(type, "stack"));
-  assert(region_address == &local_var);
-  assert(region_size == sizeof(local_var));
-
-  type = __asan_locate_address(heap_ptr, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(type, "heap"));
-  assert(region_address == heap_ptr);
-  assert(10 == region_size);
-
-  type = __asan_locate_address(heap_ptr+1, name, 100,
-                               &region_address, &region_size);
-  assert(0 == strcmp(type, "heap"));
-  assert(region_address == heap_ptr);
-  assert(10 == region_size);
-
-  size_t shadow_scale;
-  size_t shadow_offset;
-  __asan_get_shadow_mapping(&shadow_scale, &shadow_offset);
-
-  uintptr_t shadow_ptr = (((uintptr_t)heap_ptr) >> shadow_scale)
-                         + shadow_offset;
-  type = __asan_locate_address((void *)shadow_ptr, NULL, 0, NULL, NULL);
-  assert((0 == strcmp(type, "high shadow")) || 0 == strcmp(type, "low shadow"));
-
-  uintptr_t shadow_gap = (shadow_ptr >> shadow_scale) + shadow_offset;
-  type = __asan_locate_address((void *)shadow_gap, NULL, 0, NULL, NULL);
-  assert(0 == strcmp(type, "shadow gap"));
-
-  free(heap_ptr);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_mapping.cc (removed)
@@ -1,30 +0,0 @@
-// Checks that the debugging API returns correct shadow scale and offset.
-// RUN: %clangxx_asan -O %s -o %t
-// RUN: %env_asan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s
-
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if _WIN64
-#define PTR "%llx"
-#else
-#define PTR "%lx"
-#endif
-
-// printed because of verbosity=1
-// CHECK: SHADOW_SCALE: [[SCALE:[0-9]+]]
-// CHECK: SHADOW_OFFSET: [[OFFSET:0x[0-9a-f]+]]
-
-int main() {
-  size_t scale, offset;
-  __asan_get_shadow_mapping(&scale, &offset);
-
-  fprintf(stderr, "scale: %d\n", (int)scale);
-  fprintf(stderr, "offset: 0x" PTR "\n", (void*)offset);
-
-  // CHECK: scale: [[SCALE]]
-  // CHECK: offset: [[OFFSET]]
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_ppc64_mapping.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clang_asan -O0 %s -o %t
-// RUN: %env_asan_opts=verbosity=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64-V0
-// RUN: %env_asan_opts=verbosity=2 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-PPC64
-// REQUIRES: powerpc64-target-arch
-
-#include <stdio.h>
-
-int main() {
-// CHECK-PPC64: || `[{{0x200|0x180|0x0a0|0x040}}000000000, {{0x7ff|0x3ff|0x0ff}}fffffffff]` || HighMem    ||
-// CHECK-PPC64: || `[{{0x140|0x130|0x034|0x028}}000000000, {{0x1ff|0x17f|0x09f|0x03f}}fffffffff]` || HighShadow ||
-// CHECK-PPC64: || `[{{0x120|0x024|0x024}}000000000, {{0x12f|0x13f|0x033|0x027}}fffffffff]` || ShadowGap  ||
-// CHECK-PPC64: || `[{{0x100|0x020}}000000000, {{0x11f|0x023}}fffffffff]`       || LowShadow  ||
-// CHECK-PPC64: || `[0x000000000000, {{0x0ff|0x01f}}fffffffff]`       || LowMem     ||
-//
-  printf("ppc64 eyecatcher \n");
-// CHECK-PPC64-V0: ppc64 eyecatcher
-
-  return 0;
-}
-
-/*
- * Several different signatures noted.
-
-Newer kernel: (Fedora starting with kernel version 4.?)
-|| `[0x200000000000, 0x7fffffffffff]` || HighMem    ||
-|| `[0x140000000000, 0x1fffffffffff]` || HighShadow ||
-|| `[0x120000000000, 0x13ffffffffff]` || ShadowGap  ||
-|| `[0x100000000000, 0x11ffffffffff]` || LowShadow  ||
-|| `[0x000000000000, 0x0fffffffffff]` || LowMem     ||
-
-Newer kernel: (Ubuntu starting with kernel version 4.?)
-|| `[0x180000000000, 0x3fffffffffff]` || HighMem    ||
-|| `[0x130000000000, 0x17ffffffffff]` || HighShadow ||
-|| `[0x120000000000, 0x12ffffffffff]` || ShadowGap  ||
-|| `[0x100000000000, 0x11ffffffffff]` || LowShadow  ||
-|| `[0x000000000000, 0x0fffffffffff]` || LowMem     ||
-
-Newish kernel: (64TB address range support, starting with kernel version 3.7)
-|| `[0x0a0000000000, 0x3fffffffffff]` || HighMem    ||
-|| `[0x034000000000, 0x09ffffffffff]` || HighShadow ||
-|| `[0x024000000000, 0x033fffffffff]` || ShadowGap  ||
-|| `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
-|| `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
-
-Oldish kernel:
-|| `[0x040000000000, 0x0fffffffffff]` || HighMem    ||
-|| `[0x028000000000, 0x03ffffffffff]` || HighShadow ||
-|| `[0x024000000000, 0x027fffffffff]` || ShadowGap  ||
-|| `[0x020000000000, 0x023fffffffff]` || LowShadow  ||
-|| `[0x000000000000, 0x01ffffffffff]` || LowMem     ||
-*/
-

Removed: compiler-rt/trunk/test/asan/TestCases/debug_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_report.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_report.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_report.cc (removed)
@@ -1,69 +0,0 @@
-// Checks that the ASan debugging API for getting report information
-// returns correct values.
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-// FIXME: Doesn't work with DLLs
-// XFAIL: win32-dynamic-asan
-
-int main() {
-  // Disable stderr buffering. Needed on Windows.
-  setvbuf(stderr, NULL, _IONBF, 0);
-
-  char *heap_ptr = (char *)malloc(10);
-  free(heap_ptr);
-  int present = __asan_report_present();
-  fprintf(stderr, "%s\n", (present == 0) ? "no report" : "");
-  // CHECK: no report
-  heap_ptr[0] = 'A'; // BOOM
-  return 0;
-}
-
-// If we use %p with MSVC, it comes out all upper case. Use %08x to get
-// lowercase hex.
-#ifdef _MSC_VER
-# ifdef _WIN64
-#  define PTR_FMT "0x%08llx"
-# else
-#  define PTR_FMT "0x%08x"
-# endif
-// Solaris libc omits the leading 0x.
-#elif defined(__sun__) && defined(__svr4__)
-# define PTR_FMT "0x%p"
-#else
-# define PTR_FMT "%p"
-#endif
-
-void __asan_on_error() {
-  int present = __asan_report_present();
-  void *pc = __asan_get_report_pc();
-  void *bp = __asan_get_report_bp();
-  void *sp = __asan_get_report_sp();
-  void *addr = __asan_get_report_address();
-  int is_write = __asan_get_report_access_type();
-  size_t access_size = __asan_get_report_access_size();
-  const char *description = __asan_get_report_description();
-
-  fprintf(stderr, "%s\n", (present == 1) ? "report" : "");
-  // CHECK: report
-  fprintf(stderr, "pc: " PTR_FMT "\n", pc);
-  // CHECK: pc: 0x[[PC:[0-9a-f]+]]
-  fprintf(stderr, "bp: " PTR_FMT "\n", bp);
-  // CHECK: bp: 0x[[BP:[0-9a-f]+]]
-  fprintf(stderr, "sp: " PTR_FMT "\n", sp);
-  // CHECK: sp: 0x[[SP:[0-9a-f]+]]
-  fprintf(stderr, "addr: " PTR_FMT "\n", addr);
-  // CHECK: addr: 0x[[ADDR:[0-9a-f]+]]
-  fprintf(stderr, "type: %s\n", (is_write ? "write" : "read"));
-  // CHECK: type: write
-  fprintf(stderr, "access_size: %ld\n", access_size);
-  // CHECK: access_size: 1
-  fprintf(stderr, "description: %s\n", description);
-  // CHECK: description: heap-use-after-free
-}
-
-// CHECK: AddressSanitizer: heap-use-after-free on address {{0x0*}}[[ADDR]] at pc {{0x0*}}[[PC]] bp {{0x0*}}[[BP]] sp {{0x0*}}[[SP]]
-// CHECK: WRITE of size 1 at {{0x0*}}[[ADDR]] thread T0

Removed: compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/debug_stacks.cc (removed)
@@ -1,74 +0,0 @@
-// Check that the stack trace debugging API works and returns correct
-// malloc and free stacks.
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// FIXME: Figure out why allocation/free stack traces may be too short on ARM.
-// REQUIRES: stable-runtime
-
-#if _WIN64
-#define PTR "%llx"
-#else
-#define PTR "%lx"
-#endif
-
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-char *mem;
-void func1() {
-  mem = (char *)malloc(10);
-}
-
-void func2() {
-  free(mem);
-}
-
-int main() {
-  // Disable stderr buffering. Needed on Windows.
-  setvbuf(stderr, NULL, _IONBF, 0);
-
-  func1();
-  func2();
-
-  void *trace[100];
-  size_t num_frames = 100;
-  int thread_id;
-  num_frames = __asan_get_alloc_stack(mem, trace, num_frames, &thread_id);
-
-  fprintf(stderr, "alloc stack retval %s\n", (num_frames > 0 && num_frames < 10)
-          ? "ok" : "");
-  // CHECK: alloc stack retval ok
-  fprintf(stderr, "thread id = %d\n", thread_id);
-  // CHECK: thread id = 0
-  fprintf(stderr, "0x" PTR "\n", trace[0]);
-  // CHECK: [[ALLOC_FRAME_0:0x[0-9a-f]+]]
-  fprintf(stderr, "0x" PTR "\n", trace[1]);
-  // CHECK: [[ALLOC_FRAME_1:0x[0-9a-f]+]]
-
-  num_frames = 100;
-  num_frames = __asan_get_free_stack(mem, trace, num_frames, &thread_id);
-
-  fprintf(stderr, "free stack retval %s\n", (num_frames > 0 && num_frames < 10)
-          ? "ok" : "");
-  // CHECK: free stack retval ok
-  fprintf(stderr, "thread id = %d\n", thread_id);
-  // CHECK: thread id = 0
-  fprintf(stderr, "0x" PTR "\n", trace[0]);
-  // CHECK: [[FREE_FRAME_0:0x[0-9a-f]+]]
-  fprintf(stderr, "0x" PTR "\n", trace[1]);
-  // CHECK: [[FREE_FRAME_1:0x[0-9a-f]+]]
-
-  mem[0] = 'A'; // BOOM
-
-  // CHECK: ERROR: AddressSanitizer: heap-use-after-free
-  // CHECK: WRITE of size 1 at 0x{{.*}}
-  // CHECK: freed by thread T0 here:
-  // CHECK: #0 [[FREE_FRAME_0]]
-  // CHECK: #1 [[FREE_FRAME_1]]
-  // CHECK: previously allocated by thread T0 here:
-  // CHECK: #0 [[ALLOC_FRAME_0]]
-  // CHECK: #1 [[ALLOC_FRAME_1]]
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/deep_stack_uaf.cc (removed)
@@ -1,35 +0,0 @@
-// Check that we can store lots of stack frames if asked to.
-
-// RUN: %clangxx_asan -O0 %s -o %t 2>&1
-// RUN: %env_asan_opts=malloc_context_size=120:redzone=512 not %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-#include <stdlib.h>
-#include <stdio.h>
-
-template <int depth>
-struct DeepFree {
-  static void free(char *x) {
-    DeepFree<depth - 1>::free(x);
-  }
-};
-
-template<>
-struct DeepFree<0> {
-  static void free(char *x) {
-    ::free(x);
-  }
-};
-
-int main() {
-  char *x = (char*)malloc(10);
-  // deep_free(x);
-  DeepFree<200>::free(x);
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // The libcxxrt demangling procedure on FreeBSD 9.2 incorrectly appends
-  // extra 'E' characters to the end of template arguments; see:
-  // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192115
-  // CHECK: {{DeepFree<36>|DeepFree<36E>}}
-  // CHECK: {{DeepFree<98>|DeepFree<98E>}}
-  // CHECK: {{DeepFree<115>|DeepFree<115E>}}
-}

Removed: compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/deep_tail_call.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// CHECK: AddressSanitizer: global-buffer-overflow
-int global[10];
-// CHECK: {{#0.*call4}}
-void __attribute__((noinline)) call4(int i) { global[i+10]++; }
-// CHECK: {{#1.*call3}}
-void __attribute__((noinline)) call3(int i) { call4(i); }
-// CHECK: {{#2.*call2}}
-void __attribute__((noinline)) call2(int i) { call3(i); }
-// CHECK: {{#3.*call1}}
-void __attribute__((noinline)) call1(int i) { call2(i); }
-// CHECK: {{#4.*main}}
-int main(int argc, char **argv) {
-  call1(argc);
-  return global[0];
-}

Removed: compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/default_blacklist.cc (removed)
@@ -1,7 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-// UNSUPPORTED: ios
-//
-// Test that ASan uses the default blacklist from resource directory.
-// RUN: %clangxx_asan -### %s 2>&1 | FileCheck %s
-// CHECK: fsanitize-blacklist={{.*}}asan_blacklist.txt

Removed: compiler-rt/trunk/test/asan/TestCases/default_options.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/default_options.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/default_options.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/default_options.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: %run %t 2>&1 | FileCheck %s
-
-// FIXME: Doesn't work with DLLs
-// XFAIL: win32-dynamic-asan
-
-const char *kAsanDefaultOptions="verbosity=1 help=1";
-
-extern "C"
-__attribute__((no_sanitize_address))
-const char *__asan_default_options() {
-  // CHECK: Available flags for AddressSanitizer:
-  return kAsanDefaultOptions;
-}
-
-int main() {
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/describe_address.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/describe_address.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/describe_address.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/describe_address.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-#include <sanitizer/asan_interface.h>
-
-int global;
-
-int main(int argc, char *argv[]) {
-  int stack;
-  int *heap = new int[100];
-  __asan_describe_address(heap);
-  // CHECK: {{.*}} is located 0 bytes inside of 400-byte region
-  // CHECK: allocated by thread T{{.*}} here
-  __asan_describe_address(&stack);
-  // CHECK: Address {{.*}} is located in stack of thread T{{.*}} at offset {{.*}}
-  __asan_describe_address(&global);
-  // CHECK: {{.*}} is located 0 bytes inside of global variable 'global'
-  delete[] heap;
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/double-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/double-free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/double-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/double-free.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t 2>&1
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX
-
-// Also works if no malloc context is available.
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
-
-// RUN: %clangxx_asan -O0 -fsanitize-recover=address %s -o %t 2>&1
-// RUN: %env_asan_opts=halt_on_error=false %run %t 2>&1 | FileCheck %s --check-prefix CHECK-RECOVER
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  memset(x, 0, 10);
-  int res = x[argc];
-  free(x);
-  free(x + argc - 1);  // BOOM
-  // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
-  // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}double-free.cc:[[@LINE-3]]
-  // CHECK: freed by thread T0 here:
-  // MALLOC-CTX: #0 0x{{.*}} in {{.*}}free
-  // MALLOC-CTX: #1 0x{{.*}} in main {{.*}}double-free.cc:[[@LINE-7]]
-  // CHECK: allocated by thread T0 here:
-  // MALLOC-CTX: double-free.cc:[[@LINE-12]]
-  // CHECK-RECOVER: AddressSanitizer: attempting double-free{{.*}}in thread T0
-  // CHECK-RECOVER-NOT: AddressSanitizer CHECK failed:
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/double-free.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/double-free.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/double-free.cpp?p2=compiler-rt/trunk/test/asan/TestCases/double-free.cpp&p1=compiler-rt/trunk/test/asan/TestCases/double-free.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/double-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/double-free.cpp Mon Aug  5 09:48:12 2019
@@ -19,12 +19,12 @@ int main(int argc, char **argv) {
   free(x + argc - 1);  // BOOM
   // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
   // CHECK: #0 0x{{.*}} in {{.*}}free
-  // CHECK: #1 0x{{.*}} in main {{.*}}double-free.cc:[[@LINE-3]]
+  // CHECK: #1 0x{{.*}} in main {{.*}}double-free.cpp:[[@LINE-3]]
   // CHECK: freed by thread T0 here:
   // MALLOC-CTX: #0 0x{{.*}} in {{.*}}free
-  // MALLOC-CTX: #1 0x{{.*}} in main {{.*}}double-free.cc:[[@LINE-7]]
+  // MALLOC-CTX: #1 0x{{.*}} in main {{.*}}double-free.cpp:[[@LINE-7]]
   // CHECK: allocated by thread T0 here:
-  // MALLOC-CTX: double-free.cc:[[@LINE-12]]
+  // MALLOC-CTX: double-free.cpp:[[@LINE-12]]
   // CHECK-RECOVER: AddressSanitizer: attempting double-free{{.*}}in thread T0
   // CHECK-RECOVER-NOT: AddressSanitizer CHECK failed:
   return res;

Removed: compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/error_report_callback.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 0 2>&1 | FileCheck %s
-
-#include <sanitizer/asan_interface.h>
-#include <stdio.h>
-
-static void ErrorReportCallbackOneToZ(const char *report) {
-  fprintf(stderr, "ABCDEF%sGHIJKL", report);
-  fflush(stderr);
-}
-
-int main(int argc, char **argv) {
-  __asan_set_error_report_callback(ErrorReportCallbackOneToZ);
-  __asan_report_error(
-      (void *)__builtin_extract_return_addr(__builtin_return_address(0)), 0, 0,
-      0, true, 1);
-  // CHECK: ABCDEF
-  // CHECK: ERROR: AddressSanitizer
-  // CHECK: GHIJKL
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/exitcode.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/exitcode.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/exitcode.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/exitcode.cc (removed)
@@ -1,130 +0,0 @@
-// RUN: %clangxx_asan -g %stdcxx11 -Wno-deprecated-declarations %s -o %t
-// RUN: %env_asan_opts=exitcode=42 %run %t | FileCheck %s
-
-// Android doesn't have spawn.h or posix_spawn.
-// UNSUPPORTED: android
-
-// CHECK: got expected 42 exit code
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef _WIN32
-#include <windows.h>
-
-int spawn_child(char **argv) {
-  // Set an environment variable to tell the child process to interrupt
-  // itself.
-  if (!SetEnvironmentVariableW(L"CRASH_FOR_TEST", L"1")) {
-    printf("SetEnvironmentVariableW failed (0x%8lx).\n", GetLastError());
-    fflush(stdout);
-    exit(1);
-  }
-
-  STARTUPINFOW si;
-  memset(&si, 0, sizeof(si));
-  si.cb = sizeof(si);
-
-  PROCESS_INFORMATION pi;
-  memset(&pi, 0, sizeof(pi));
-
-  if (!CreateProcessW(nullptr,           // No module name (use command line)
-                      GetCommandLineW(), // Command line
-                      nullptr,           // Process handle not inheritable
-                      nullptr,           // Thread handle not inheritable
-                      TRUE,              // Set handle inheritance to TRUE
-                      0,                 // No flags
-                      nullptr,           // Use parent's environment block
-                      nullptr,           // Use parent's starting directory
-                      &si, &pi)) {
-    printf("CreateProcess failed (0x%08lx).\n", GetLastError());
-    fflush(stdout);
-    exit(1);
-  }
-
-  WaitForSingleObject(pi.hProcess, INFINITE);
-
-  DWORD exit_code;
-  if (!GetExitCodeProcess(pi.hProcess, &exit_code)) {
-    printf("GetExitCodeProcess failed (0x%08lx).\n", GetLastError());
-    fflush(stdout);
-    exit(1);
-  }
-
-  CloseHandle(pi.hProcess);
-  CloseHandle(pi.hThread);
-
-  return exit_code;
-}
-#else
-#include <spawn.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-#if defined(__APPLE__)
-#include <TargetConditionals.h>
-#endif
-
-#if defined(__APPLE__) && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
-#define USE_NSGETENVIRON 1
-#else
-#define USE_NSGETENVIRON 0
-#endif
-
-#if !USE_NSGETENVIRON
-extern char **environ;
-#else
-#include <crt_externs.h> // _NSGetEnviron
-#endif
-
-int spawn_child(char **argv) {
-  setenv("CRASH_FOR_TEST", "1", 1);
-
-#if !USE_NSGETENVIRON
-  char **envp = environ;
-#else
-  char **envp = *_NSGetEnviron();
-#endif
-
-  pid_t pid;
-  int err = posix_spawn(&pid, argv[0], nullptr, nullptr, argv, envp);
-  if (err) {
-    printf("posix_spawn failed: %d\n", err);
-    fflush(stdout);
-    exit(1);
-  }
-
-  // Wait until the child exits.
-  int status;
-  pid_t wait_result_pid;
-  do {
-    wait_result_pid = waitpid(pid, &status, 0);
-  } while (wait_result_pid == -1 && errno == EINTR);
-
-  if (wait_result_pid != pid || !WIFEXITED(status)) {
-    printf("error in waitpid\n");
-    fflush(stdout);
-    exit(1);
-  }
-
-  // Return the exit status.
-  return WEXITSTATUS(status);
-}
-#endif
-
-int main(int argc, char **argv) {
-  int r = 0;
-  if (getenv("CRASH_FOR_TEST")) {
-    // Generate an asan report to test ASAN_OPTIONS=exitcode=42
-    int *p = new int;
-    delete p;
-    r = *p;
-  } else {
-    int exit_code = spawn_child(argv);
-    if (exit_code == 42) {
-      printf("got expected 42 exit code\n");
-      fflush(stdout);
-    }
-  }
-  return r;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/force_inline_opt0.cc (removed)
@@ -1,14 +0,0 @@
-// This test checks that we are no instrumenting a memory access twice
-// (before and after inlining)
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-__attribute__((always_inline))
-void foo(int *x) {
-  *x = 0;
-}
-
-int main() {
-  int x;
-  foo(&x);
-  return x;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/frexp_interceptor.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Test the frexp() interceptor.
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-int main() {
-  double x = 3.14;
-  int *exp = (int*)malloc(sizeof(int));
-  free(exp);
-  double y = frexp(x, exp);
-  // CHECK: use-after-free
-  // CHECK: SUMMARY
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/global-demangle.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-demangle.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-demangle.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-demangle.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-namespace XXX {
-class YYY {
- public:
-  static char ZZZ[];
-};
-char YYY::ZZZ[] = "abc";
-}
-
-int main(int argc, char **argv) {
-  return (int)XXX::YYY::ZZZ[argc + 5];  // BOOM
-  // CHECK: {{READ of size 1 at 0x.*}}
-  // CHECK: {{0x.* is located 2 bytes to the right of global variable}}
-  // CHECK: 'XXX::YYY::ZZZ' {{.*}} of size 4
-  // CHECK: 'XXX::YYY::ZZZ' is ascii string 'abc'
-}

Removed: compiler-rt/trunk/test/asan/TestCases/global-location.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-location.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-location.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-location.cc (removed)
@@ -1,38 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t g 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=GLOB
-// RUN: not %run %t c 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CLASS_STATIC
-// RUN: not %run %t f 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=FUNC_STATIC
-// RUN: not %run %t l 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=LITERAL
-
-// CHECK: AddressSanitizer: global-buffer-overflow
-
-#include <string.h>
-
-struct C {
-  static int array[10];
-};
-
-int global[10];
-// GLOB: 0x{{.*}} is located 4 bytes to the right of global variable 'global' defined in '{{.*}}global-location.cc:[[@LINE-1]]:5' {{.*}} of size 40
-int C::array[10];
-// CLASS_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'C::array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:8' {{.*}} of size 40
-
-int main(int argc, char **argv) {
-  int one = argc - 1;
-  switch (argv[1][0]) {
-  case 'g': return global[one * 11];
-  case 'c': return C::array[one * 11];
-  case 'f':
-    static int array[10];
-    // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:16' {{.*}} of size 40
-    memset(array, 0, 10);
-    return array[one * 11];
-  case 'l':
-    const char *str = "0123456789";
-    // LITERAL: 0x{{.*}} is located 0 bytes to the right of global variable {{.*}} defined in '{{.*}}global-location.cc:[[@LINE-1]]:23' {{.*}} of size 11
-    return str[one * 11];
-  }
-  return 0;
-}
-
-// CHECK: SUMMARY: AddressSanitizer: global-buffer-overflow

Copied: compiler-rt/trunk/test/asan/TestCases/global-location.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/global-location.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-location.cpp?p2=compiler-rt/trunk/test/asan/TestCases/global-location.cpp&p1=compiler-rt/trunk/test/asan/TestCases/global-location.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-location.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-location.cpp Mon Aug  5 09:48:12 2019
@@ -13,9 +13,9 @@ struct C {
 };
 
 int global[10];
-// GLOB: 0x{{.*}} is located 4 bytes to the right of global variable 'global' defined in '{{.*}}global-location.cc:[[@LINE-1]]:5' {{.*}} of size 40
+// GLOB: 0x{{.*}} is located 4 bytes to the right of global variable 'global' defined in '{{.*}}global-location.cpp:[[@LINE-1]]:5' {{.*}} of size 40
 int C::array[10];
-// CLASS_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'C::array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:8' {{.*}} of size 40
+// CLASS_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'C::array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]:8' {{.*}} of size 40
 
 int main(int argc, char **argv) {
   int one = argc - 1;
@@ -24,12 +24,12 @@ int main(int argc, char **argv) {
   case 'c': return C::array[one * 11];
   case 'f':
     static int array[10];
-    // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'array' defined in '{{.*}}global-location.cc:[[@LINE-1]]:16' {{.*}} of size 40
+    // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]:16' {{.*}} of size 40
     memset(array, 0, 10);
     return array[one * 11];
   case 'l':
     const char *str = "0123456789";
-    // LITERAL: 0x{{.*}} is located 0 bytes to the right of global variable {{.*}} defined in '{{.*}}global-location.cc:[[@LINE-1]]:23' {{.*}} of size 11
+    // LITERAL: 0x{{.*}} is located 0 bytes to the right of global variable {{.*}} defined in '{{.*}}global-location.cpp:[[@LINE-1]]:23' {{.*}} of size 11
     return str[one * 11];
   }
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/global-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-overflow.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <string.h>
-int main(int argc, char **argv) {
-  static char XXX[10];
-  static char YYY[10];
-  static char ZZZ[10];
-  memset(XXX, 0, 10);
-  memset(YYY, 0, 10);
-  memset(ZZZ, 0, 10);
-  int res = YYY[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*global-overflow.cc:}}[[@LINE-2]]
-  // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
-  // CHECK:   {{.*YYY.* of size 10}}
-  res += XXX[argc] + ZZZ[argc];
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/global-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/global-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/global-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/global-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
   memset(ZZZ, 0, 10);
   int res = YYY[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*global-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*global-overflow.cpp:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
   // CHECK:   {{.*YYY.* of size 10}}
   res += XXX[argc] + ZZZ[argc];

Removed: compiler-rt/trunk/test/asan/TestCases/global-underflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-underflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-underflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-underflow.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan -O0 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-
-int XXX[2] = {2, 3};
-extern int YYY[];
-#include <string.h>
-int main(int argc, char **argv) {
-  memset(XXX, 0, 2*sizeof(int));
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*global-underflow.cc:}}[[@LINE+3]]
-  // CHECK: {{0x.* is located 4 bytes to the left of global variable}}
-  // CHECK:   {{.*YYY.* of size 12}}
-  int res = YYY[-1];
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/global-underflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/global-underflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/global-underflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/global-underflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/global-underflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/global-underflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/global-underflow.cpp Mon Aug  5 09:48:12 2019
@@ -1,7 +1,7 @@
-// RUN: %clangxx_asan -O0 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s %p/Helpers/underflow.cc -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s %p/Helpers/underflow.cpp -o %t && not %run %t 2>&1 | FileCheck %s
 
 int XXX[2] = {2, 3};
 extern int YYY[];
@@ -9,7 +9,7 @@ extern int YYY[];
 int main(int argc, char **argv) {
   memset(XXX, 0, 2*sizeof(int));
   // CHECK: {{READ of size 4 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*global-underflow.cc:}}[[@LINE+3]]
+  // CHECK: {{    #0 0x.* in main .*global-underflow.cpp:}}[[@LINE+3]]
   // CHECK: {{0x.* is located 4 bytes to the left of global variable}}
   // CHECK:   {{.*YYY.* of size 12}}
   int res = YYY[-1];

Removed: compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/handle_noreturn_bug.cc (removed)
@@ -1,13 +0,0 @@
-// Regression test: __asan_handle_no_return should unpoison stack even with poison_heap=0.
-// RUN: %clangxx_asan -O0 %s -o %t && \
-// RUN: %env_asan_opts=poison_heap=1 %run %t && \
-// RUN: %env_asan_opts=poison_heap=0 %run %t
-
-#include <sanitizer/asan_interface.h>
-
-int main(int argc, char **argv) {
-  int x[2];
-  int * volatile p = &x[0];
-  __asan_handle_no_return();
-  int volatile z = p[2];
-}

Removed: compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heap-overflow-large.cc (removed)
@@ -1,23 +0,0 @@
-// Regression test for
-// https://code.google.com/p/address-sanitizer/issues/detail?id=183
-
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t 12 2>&1 | FileCheck %s
-// RUN: not %run %t 100 2>&1 | FileCheck %s
-// RUN: not %run %t 10000 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-int main(int argc, char *argv[]) {
-  fprintf(stderr, "main\n");
-  int *x = new int[5];
-  memset(x, 0, sizeof(x[0]) * 5);
-  int index = atoi(argv[1]);
-  unsigned res = x[index];
-  // CHECK: main
-  // CHECK-NOT: CHECK failed
-  delete[] x;
-  return (res % 10) + 1;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc (removed)
@@ -1,24 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=print_stats=1 not %run %t 2>&1 | FileCheck %s
-
-// FIXME: Fix this test under GCC.
-// REQUIRES: Clang
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  memset(x, 0, 10);
-  int res = x[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*heap-overflow.cc:}}[[@LINE-2]]
-  // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}}
-  // CHECK: {{allocated by thread T0 here:}}
-
-  // CHECK: {{    #0 0x.* in .*malloc}}
-  free(x);
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/heap-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heap-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/heap-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heap-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heap-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*heap-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*heap-overflow.cpp:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 

Removed: compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc (removed)
@@ -1,70 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// XFAIL: windows-msvc
-
-// FIXME: Fix this test under GCC.
-// REQUIRES: Clang
-
-// FIXME: Fix this test for dynamic runtime on arm linux.
-// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
-
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-__attribute__((noinline))
-char *pretend_to_do_something(char *x) {
-  __asm__ __volatile__("" : : "r" (x) : "memory");
-  return x;
-}
-
-__attribute__((noinline))
-char *LeakStack() {
-  char x[1024];
-  memset(x, 0, sizeof(x));
-  return pretend_to_do_something(x);
-}
-
-template<size_t kFrameSize>
-__attribute__((noinline))
-void RecursiveFunctionWithStackFrame(int depth) {
-  if (depth <= 0) return;
-  char x[kFrameSize];
-  x[0] = depth;
-  pretend_to_do_something(x);
-  RecursiveFunctionWithStackFrame<kFrameSize>(depth - 1);
-}
-
-int main(int argc, char **argv) {
-#ifdef _MSC_VER
-  // FIXME: This test crashes on Windows and raises a dialog. Avoid running it
-  // in addition to XFAILing it.
-  return 42;
-#endif
-
-  int n_iter = argc >= 2 ? atoi(argv[1]) : 1000;
-  int depth  = argc >= 3 ? atoi(argv[2]) : 500;
-  for (int i = 0; i < n_iter; i++) {
-    RecursiveFunctionWithStackFrame<10>(depth);
-    RecursiveFunctionWithStackFrame<100>(depth);
-    RecursiveFunctionWithStackFrame<500>(depth);
-    RecursiveFunctionWithStackFrame<1024>(depth);
-    RecursiveFunctionWithStackFrame<2000>(depth);
-    // The stack size is tight for the main thread in multithread
-    // environment on FreeBSD and NetBSD.
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-    RecursiveFunctionWithStackFrame<5000>(depth);
-    RecursiveFunctionWithStackFrame<10000>(depth);
-#endif
-  }
-  char *stale_stack = LeakStack();
-  RecursiveFunctionWithStackFrame<1024>(10);
-  stale_stack[100]++;
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-return on address
-  // CHECK: is located in stack of thread T0 at offset {{116|132}} in frame
-  // CHECK:  in LeakStack{{.*}}heavy_uar_test.cc:
-  // CHECK: [{{16|32}}, {{1040|1056}}) 'x'
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cpp Mon Aug  5 09:48:12 2019
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
   stale_stack[100]++;
   // CHECK: ERROR: AddressSanitizer: stack-use-after-return on address
   // CHECK: is located in stack of thread T0 at offset {{116|132}} in frame
-  // CHECK:  in LeakStack{{.*}}heavy_uar_test.cc:
+  // CHECK:  in LeakStack{{.*}}heavy_uar_test.cpp:
   // CHECK: [{{16|32}}, {{1040|1056}}) 'x'
   return 0;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/huge_negative_hea_oob.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O %s -o %t && not %run %t 2>&1 | FileCheck %s
-// Check that we can find huge buffer overflows to the left.
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(1 << 20);
-  memset(x, 0, 10);
-  int res = x[-argc * 4000];  // BOOOM
-  // CHECK: is located 4000 bytes to the left of
-  free(x);
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/ill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/ill.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/ill.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/ill.cc (removed)
@@ -1,31 +0,0 @@
-// Test the handle_sigill option.
-//
-// RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %clangxx_asan %s -o %t && %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// REQUIRES: x86-target-arch
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-int main(int argc, char **argv) {
-#ifdef _WIN32
-  // Sometimes on Windows this test generates a WER fault dialog. Suppress that.
-  UINT new_flags = SEM_FAILCRITICALERRORS |
-                   SEM_NOGPFAULTERRORBOX |
-                   SEM_NOOPENFILEERRORBOX;
-  // Preserve existing error mode, as discussed at
-  // http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx
-  UINT existing_flags = SetErrorMode(new_flags);
-  SetErrorMode(existing_flags | new_flags);
-#endif
-
-  if (argc)
-    __builtin_trap();
-  // Unreachable code to avoid confusing the Windows unwinder.
-#ifdef _WIN32
-  SetErrorMode(0);
-#endif
-}
-// CHECK0-NOT: ERROR: AddressSanitizer
-// CHECK1: ERROR: AddressSanitizer: {{ILL|illegal-instruction}} on unknown address {{0x0*}}

Removed: compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc (removed)
@@ -1,31 +0,0 @@
-// Test for the following situation:
-// (1) global A is constructed.
-// (2) exit() is called during construction of global B.
-// (3) destructor of A reads uninitialized global C from another module.
-// We do *not* want to report init-order bug in this case.
-
-// RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
-// RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <stdlib.h>
-
-void AccessC();
-
-class A {
- public:
-  A() { }
-  ~A() { AccessC(); printf("PASSED\n"); }
-  // CHECK-NOT: AddressSanitizer
-  // CHECK: PASSED
-};
-
-A a;
-
-class B {
- public:
-  B() { exit(1); }
-  ~B() { }
-};
-
-B b;

Copied: compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cpp?p2=compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cpp&p1=compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-atexit.cpp Mon Aug  5 09:48:12 2019
@@ -4,7 +4,7 @@
 // (3) destructor of A reads uninitialized global C from another module.
 // We do *not* want to report init-order bug in this case.
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cpp -o %t
 // RUN: %env_asan_opts=strict_init_order=true not %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>

Removed: compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc (removed)
@@ -1,29 +0,0 @@
-// Test for blacklist functionality of initialization-order checker.
-
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-
-// Function is defined in another TU.
-int readBadGlobal();
-int x = readBadGlobal();  // init-order bug.
-
-// Function is defined in another TU.
-int accessBadObject();
-int y = accessBadObject();  // init-order bug.
-
-int readBadSrcGlobal();
-int z = readBadSrcGlobal();  // init-order bug.
-
-int main(int argc, char **argv) {
-  return argc + x + y + z - 1;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cpp?p2=compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cpp&p1=compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-blacklist.cpp Mon Aug  5 09:48:12 2019
@@ -1,15 +1,15 @@
 // Test for blacklist functionality of initialization-order checker.
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-blacklist-extra.cpp\
+// RUN:   %p/Helpers/initialization-blacklist-extra2.cpp \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cpp\
+// RUN:   %p/Helpers/initialization-blacklist-extra2.cpp \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cpp\
+// RUN:   %p/Helpers/initialization-blacklist-extra2.cpp \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
 

Removed: compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc (removed)
@@ -1,51 +0,0 @@
-// Test to make sure basic initialization order errors are caught.
-
-// RUN: %clangxx_asan %macos_min_target_10_11 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t-INIT-ORDER-EXE
-// RUN: %env_asan_opts=check_initialization_order=true not %run %t-INIT-ORDER-EXE 2>&1 | FileCheck %s
-
-// Do not test with optimization -- the error may be optimized away.
-
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=186
-// XFAIL: windows-msvc
-
-// The test is expected to fail on OS X Yosemite and older
-// UNSUPPORTED: osx-no-ld64-live_support
-// UNSUPPORTED: ios
-
-#include <cstdio>
-
-// The structure of the test is:
-// "x", "y", "z" are dynamically initialized globals.
-// Value of "x" depends on "y", value of "y" depends on "z".
-// "x" and "z" are defined in this TU, "y" is defined in another one.
-// Thus we shoud stably report initialization order fiasco independently of
-// the translation unit order.
-
-int initZ() {
-  return 5;
-}
-int z = initZ();
-
-// 'y' is a dynamically initialized global residing in a different TU.  This
-// dynamic initializer will read the value of 'y' before main starts.  The
-// result is undefined behavior, which should be caught by initialization order
-// checking.
-extern int y;
-int __attribute__((noinline)) initX() {
-  return y + 1;
-  // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
-  // CHECK: {{READ of size .* at 0x.* thread T0}}
-  // CHECK: {{0x.* is located 0 bytes inside of global variable .*(y|z).*}}
-  // CHECK: registered at:
-  // CHECK: 0x{{.*}} in __asan_register_globals
-}
-
-// This initializer begins our initialization order problems.
-static int x = initX();
-
-int main() {
-  // ASan should have caused an exit before main runs.
-  printf("PASS\n");
-  // CHECK-NOT: PASS
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/initialization-bug.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-bug.cpp?p2=compiler-rt/trunk/test/asan/TestCases/initialization-bug.cpp&p1=compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-bug.cpp Mon Aug  5 09:48:12 2019
@@ -1,6 +1,6 @@
 // Test to make sure basic initialization order errors are caught.
 
-// RUN: %clangxx_asan %macos_min_target_10_11 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t-INIT-ORDER-EXE
+// RUN: %clangxx_asan %macos_min_target_10_11 -O0 %s %p/Helpers/initialization-bug-extra2.cpp -o %t-INIT-ORDER-EXE
 // RUN: %env_asan_opts=check_initialization_order=true not %run %t-INIT-ORDER-EXE 2>&1 | FileCheck %s
 
 // Do not test with optimization -- the error may be optimized away.

Removed: compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc (removed)
@@ -1,27 +0,0 @@
-// Constexpr:
-// We need to check that a global variable initialized with a constexpr
-// constructor can be accessed during dynamic initialization (as a constexpr
-// constructor implies that it was initialized during constant initialization,
-// not dynamic initialization).
-
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-
-class Integer {
-  private:
-  int value;
-
-  public:
-  constexpr Integer(int x = 0) : value(x) {}
-  int getValue() {return value;}
-};
-Integer coolestInteger(42);
-int getCoolestInteger() { return coolestInteger.getValue(); }
-
-int main() { return 0; }

Copied: compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cpp?p2=compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cpp&p1=compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-constexpr.cpp Mon Aug  5 09:48:12 2019
@@ -4,13 +4,13 @@
 // constructor implies that it was initialized during constant initialization,
 // not dynamic initialization).
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cpp --std=c++11 -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cpp --std=c++11 -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cpp --std=c++11 -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cpp --std=c++11 -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
 
 class Integer {

Removed: compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc (removed)
@@ -1,48 +0,0 @@
-// A collection of various initializers which shouldn't trip up initialization
-// order checking.  If successful, this will just return 0.
-
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -o %t
-// RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-
-// Simple access:
-// Make sure that accessing a global in the same TU is safe
-
-bool condition = true;
-int initializeSameTU() {
-  return condition ? 0x2a : 052;
-}
-int sameTU = initializeSameTU();
-
-// Linker initialized:
-// Check that access to linker initialized globals originating from a different
-// TU's initializer is safe.
-
-int A = (1 << 1) + (1 << 3) + (1 << 5), B;
-int getAB() {
-  return A * B;
-}
-
-// Function local statics:
-// Check that access to function local statics originating from a different
-// TU's initializer is safe.
-
-int countCalls() {
-  static int calls;
-  return ++calls;
-}
-
-// Trivial constructor, non-trivial destructor.
-struct StructWithDtor {
-  ~StructWithDtor() { }
-  int value;
-};
-StructWithDtor struct_with_dtor;
-int getStructWithDtorValue() { return struct_with_dtor.value; }
-
-int main() { return 0; }

Copied: compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cpp?p2=compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cpp&p1=compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-nobug.cpp Mon Aug  5 09:48:12 2019
@@ -1,13 +1,13 @@
 // A collection of various initializers which shouldn't trip up initialization
 // order checking.  If successful, this will just return 0.
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cpp -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -o %t
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cpp -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -o %t
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cpp -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -o %t
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cpp -o %t
 // RUN: %env_asan_opts=check_initialization_order=true %run %t 2>&1
 
 // Simple access:

Removed: compiler-rt/trunk/test/asan/TestCases/inline.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/inline.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/inline.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/inline.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t
-
-// Test that no_sanitize_address attribute applies even when the function would
-// be normally inlined.
-
-#include <stdlib.h>
-
-__attribute__((no_sanitize_address))
-int f(int *p) {
-  return *p; // BOOOM?? Nope!
-}
-
-int main(int argc, char **argv) {
-  int * volatile x = (int*)malloc(2*sizeof(int) + 2);
-  int res = f(x + 2);
-  if (res)
-    exit(0);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/intercept-rethrow-exception.cc (removed)
@@ -1,70 +0,0 @@
-// Regression test for
-// https://bugs.llvm.org/show_bug.cgi?id=32434
-
-// RUN: %clangxx_asan -fexceptions -O0 %s -o %t
-// RUN: %run %t
-
-// The current implementation of this functionality requires special
-// combination of libraries that are not used by default on NetBSD
-// XFAIL: netbsd
-// FIXME: Bug 42703
-// XFAIL: solaris
-
-#include <assert.h>
-#include <exception>
-#include <sanitizer/asan_interface.h>
-
-namespace {
-
-// Not instrumented because std::rethrow_exception is a [[noreturn]] function,
-// for which the compiler would emit a call to __asan_handle_no_return which
-// unpoisons the stack.
-// We emulate here some code not compiled with asan. This function is not
-// [[noreturn]] because the scenario we're emulating doesn't always throw. If it
-// were [[noreturn]], the calling code would emit a call to
-// __asan_handle_no_return.
-void __attribute__((no_sanitize("address")))
-uninstrumented_rethrow_exception(std::exception_ptr const &exc_ptr) {
-  std::rethrow_exception(exc_ptr);
-}
-
-char *poisoned1;
-char *poisoned2;
-
-// Create redzones for stack variables in shadow memory and call
-// std::rethrow_exception which should unpoison the entire stack.
-void create_redzones_and_throw(std::exception_ptr const &exc_ptr) {
-  char a[100];
-  poisoned1 = a - 1;
-  poisoned2 = a + sizeof(a);
-  assert(__asan_address_is_poisoned(poisoned1));
-  assert(__asan_address_is_poisoned(poisoned2));
-  uninstrumented_rethrow_exception(exc_ptr);
-}
-
-} // namespace
-
-// Check that std::rethrow_exception is intercepted by asan and the interception
-// unpoisons the stack.
-// If std::rethrow_exception is NOT intercepted, then calls to this function
-// from instrumented code will still unpoison the stack because
-// std::rethrow_exception is a [[noreturn]] function and any [[noreturn]]
-// function call will be instrumented with __asan_handle_no_return.
-// However, calls to std::rethrow_exception from UNinstrumented code will not
-// unpoison the stack, so we need to intercept std::rethrow_exception to
-// unpoison the stack.
-int main() {
-  // In some implementations of std::make_exception_ptr, e.g. libstdc++ prior to
-  // gcc 7, this function calls __cxa_throw. The __cxa_throw is intercepted by
-  // asan to unpoison the entire stack; since this test essentially tests that
-  // the stack is unpoisoned by a call to std::rethrow_exception, we need to
-  // generate the exception_ptr BEFORE we have the local variables poison the
-  // stack.
-  std::exception_ptr my_exception_ptr = std::make_exception_ptr("up");
-
-  try {
-    create_redzones_and_throw(my_exception_ptr);
-  } catch(char const *) {
-    assert(!__asan_region_is_poisoned(poisoned1, poisoned2 - poisoned1 + 1));
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/interception_failure_test.cc (removed)
@@ -1,35 +0,0 @@
-// If user provides his own libc functions, ASan doesn't
-// intercept these functions.
-
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
-// XFAIL: freebsd
-
-// On Windows, defining strtoll in a static build results in linker errors, but
-// it works with the dynamic runtime.
-// XFAIL: win32-static-asan
-
-// On NetBSD, defining strtol in a static build results in linker errors, but
-// it works with the dynamic runtime.
-// XFAIL: netbsd && !asan-dynamic-runtime
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-extern "C" long strtol(const char *nptr, char **endptr, int base) {
-  fprintf(stderr, "my_strtol_interceptor\n");
-  if (endptr)
-    *endptr = (char*)nptr + strlen(nptr);
-  return 0;
-}
-
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return (int)strtol(x, 0, 10);
-  // CHECK: my_strtol_interceptor
-  // CHECK-NOT: heap-use-after-free
-}

Removed: compiler-rt/trunk/test/asan/TestCases/interface_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/interface_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/interface_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/interface_test.cc (removed)
@@ -1,10 +0,0 @@
-// Check that user may include ASan interface header.
-// RUN: %clang_asan %s -o %t && %run %t
-// RUN: %clang_asan -x c %s -o %t && %run %t
-// RUN: %clang %s -pie -o %t && %run %t
-// RUN: %clang -x c %s -pie -o %t && %run %t
-#include <sanitizer/asan_interface.h>
-
-int main() {
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc (removed)
@@ -1,33 +0,0 @@
-// RUN: %clangxx_asan -O0 -fsanitize-address-field-padding=1  %s -o %t
-// RUN: not %run %t 11 2>&1 | FileCheck %s
-// RUN: %run %t 10
-//
-// FIXME: fix 32-bits.
-// REQUIRES: asan-64-bits, shadow-scale-3
-// FIXME: Implement ASan intra-object padding in Clang's MS record layout
-// UNSUPPORTED: windows-msvc
-#include <stdio.h>
-#include <stdlib.h>
-class Foo {
- public:
-  Foo() : pre1(1), pre2(2), post1(3), post2(4) {
-  }
-  virtual ~Foo() {
-  }
-  void set(int i, int val) { a[i] = val; }
-// CHECK: ERROR: AddressSanitizer: intra-object-overflow
-// CHECK: #0 {{.*}}Foo::set{{.*}}intra-object-overflow.cc:[[@LINE-2]]
- private:
-  int pre1, pre2;
-  int a[11];
-  int post1, post2;
-};
-
-int main(int argc, char **argv) {
-  int idx = argc == 2 ? atoi(argv[1]) : 0;
-  Foo *foo = new Foo;
-  foo->set(idx, 42);
-// CHECK: #1 {{.*}}main{{.*}}intra-object-overflow.cc:[[@LINE-1]]
-// CHECK: is located 84 bytes inside of 128-byte region
-  delete foo;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/intra-object-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -16,7 +16,7 @@ class Foo {
   }
   void set(int i, int val) { a[i] = val; }
 // CHECK: ERROR: AddressSanitizer: intra-object-overflow
-// CHECK: #0 {{.*}}Foo::set{{.*}}intra-object-overflow.cc:[[@LINE-2]]
+// CHECK: #0 {{.*}}Foo::set{{.*}}intra-object-overflow.cpp:[[@LINE-2]]
  private:
   int pre1, pre2;
   int a[11];
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
   int idx = argc == 2 ? atoi(argv[1]) : 0;
   Foo *foo = new Foo;
   foo->set(idx, 42);
-// CHECK: #1 {{.*}}main{{.*}}intra-object-overflow.cc:[[@LINE-1]]
+// CHECK: #1 {{.*}}main{{.*}}intra-object-overflow.cpp:[[@LINE-1]]
 // CHECK: is located 84 bytes inside of 128-byte region
   delete foo;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-free.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=MALLOC-CTX
-
-// Also works if no malloc context is available.
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  char *x = (char*)malloc(10 * sizeof(char));
-  memset(x, 0, 10);
-  int res = x[argc];
-  free(x + 5);  // BOOM
-  // CHECK: AddressSanitizer: attempting free on address{{.*}}in thread T0
-  // CHECK: invalid-free.cc:[[@LINE-2]]
-  // CHECK: is located 5 bytes inside of 10-byte region
-  // CHECK: allocated by thread T0 here:
-  // MALLOC-CTX: invalid-free.cc:[[@LINE-8]]
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/invalid-free.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-free.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-free.cpp?p2=compiler-rt/trunk/test/asan/TestCases/invalid-free.cpp&p1=compiler-rt/trunk/test/asan/TestCases/invalid-free.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-free.cpp Mon Aug  5 09:48:12 2019
@@ -14,9 +14,9 @@ int main(int argc, char **argv) {
   int res = x[argc];
   free(x + 5);  // BOOM
   // CHECK: AddressSanitizer: attempting free on address{{.*}}in thread T0
-  // CHECK: invalid-free.cc:[[@LINE-2]]
+  // CHECK: invalid-free.cpp:[[@LINE-2]]
   // CHECK: is located 5 bytes inside of 10-byte region
   // CHECK: allocated by thread T0 here:
-  // MALLOC-CTX: invalid-free.cc:[[@LINE-8]]
+  // MALLOC-CTX: invalid-free.cpp:[[@LINE-8]]
   return res;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc (removed)
@@ -1,107 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2:halt_on_error=0 %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdlib.h>
-
-int foo(char *p, char *q) {
-  return p > q;
-}
-
-char global1[100] = {}, global2[100] = {};
-char __attribute__((used)) smallest_global[5] = {};
-char small_global[7] = {};
-char __attribute__((used)) little_global[10] = {};
-char __attribute__((used)) medium_global[4000] = {};
-char large_global[5000] = {};
-char __attribute__((used)) largest_global[6000] = {};
-
-int main() {
-  // Heap allocated memory.
-  char *heap1 = (char *)malloc(42);
-  char *heap2 = (char *)malloc(42);
-
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1, heap2);
-  free(heap1);
-  free(heap2);
-
-  heap1 = (char *)malloc(1024);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1, heap1 + 1025);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1 + 1024, heap1 + 1025);
-  free(heap1);
-
-  heap1 = (char *)malloc(4096);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1, heap1 + 4097);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1, 0);
-
-  // Global variables.
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(&global1[0], &global2[10]);
-
-  char *p = &small_global[0];
-  foo(p, p); // OK
-  foo(p, p + 7); // OK
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, p + 8);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p - 1, p);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, p - 1);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p - 1, p + 8);
-
-  p = &large_global[0];
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p - 1, p);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, p - 1);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, &global1[0]);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, &small_global[0]);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(p, 0);
-
-  // Stack variables.
-  char stack1, stack2;
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(&stack1, &stack2);
-
-  // Mixtures.
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(heap1, &stack1);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  foo(heap1, &global1[0]);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  foo(&stack1, &global1[0]);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
-  foo(&stack1, 0);
-
-  free(heap1);
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cpp?p2=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cpp&p1=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-errors.cpp Mon Aug  5 09:48:12 2019
@@ -23,82 +23,82 @@ int main() {
   char *heap2 = (char *)malloc(42);
 
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1, heap2);
   free(heap1);
   free(heap2);
 
   heap1 = (char *)malloc(1024);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1, heap1 + 1025);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1 + 1024, heap1 + 1025);
   free(heap1);
 
   heap1 = (char *)malloc(4096);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1, heap1 + 4097);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1, 0);
 
   // Global variables.
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(&global1[0], &global2[10]);
 
   char *p = &small_global[0];
   foo(p, p); // OK
   foo(p, p + 7); // OK
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, p + 8);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p - 1, p);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, p - 1);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p - 1, p + 8);
 
   p = &large_global[0];
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p - 1, p);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, p - 1);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, &global1[0]);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, &small_global[0]);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(p, 0);
 
   // Stack variables.
   char stack1, stack2;
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(&stack1, &stack2);
 
   // Mixtures.
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(heap1, &stack1);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
   foo(heap1, &global1[0]);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
   foo(&stack1, &global1[0]);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-compare-errors.cpp:[[@LINE+1]]
   foo(&stack1, 0);
 
   free(heap1);

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc (removed)
@@ -1,42 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=1 %run %t
-
-#include <assert.h>
-#include <stdlib.h>
-
-int foo(char *p, char *q) {
-  return p <= q;
-}
-
-char global[8192] = {};
-char small_global[7] = {};
-
-int main() {
-  // Heap allocated memory.
-  char *p = (char *)malloc(42);
-  int r = foo(p, NULL);
-  free(p);
-
-  p = (char *)malloc(1024);
-  foo(NULL, p);
-  free(p);
-
-  p = (char *)malloc(4096);
-  foo(p, NULL);
-  free(p);
-
-  // Global variable.
-  foo(&global[0], NULL);
-  foo(&global[1000], NULL);
-
-  p = &small_global[0];
-  foo(p, NULL);
-
-  // Stack variable.
-  char stack[10000];
-  foo(&stack[0], NULL);
-  foo(NULL, &stack[9000]);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-success.cc (removed)
@@ -1,74 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2 %run %t
-
-#include <assert.h>
-#include <stdlib.h>
-
-int foo(char *p) {
-  char *p2 = p + 20;
-  return p > p2;
-}
-
-int bar(char *p, char *q) {
-  return p <= q;
-}
-
-int baz(char *p, char *q) {
-  return p != 0 && p < q;
-}
-
-char global[8192] = {};
-char small_global[7] = {};
-
-int main() {
-  // Heap allocated memory.
-  char *p = (char *)malloc(42);
-  int r = foo(p);
-  free(p);
-
-  p = (char *)malloc(1024);
-  bar(p, p + 1024);
-  bar(p + 1024, p + 1023);
-  bar(p + 1, p + 1023);
-  free(p);
-
-  p = (char *)malloc(4096);
-  bar(p, p + 4096);
-  bar(p + 10, p + 100);
-  bar(p + 1024, p + 4096);
-  bar(p + 4095, p + 4096);
-  bar(p + 4095, p + 4094);
-  bar(p + 100, p + 4096);
-  bar(p + 100, p + 4094);
-  free(p);
-
-  // Global variable.
-  bar(&global[0], &global[1]);
-  bar(&global[1], &global[2]);
-  bar(&global[2], &global[1]);
-  bar(&global[0], &global[100]);
-  bar(&global[1000], &global[7000]);
-  bar(&global[500], &global[10]);
-  p = &global[0];
-  bar(p, p + 8192);
-  p = &global[8000];
-  bar(p, p + 192);
-
-  p = &small_global[0];
-  bar(p, p + 1);
-  bar(p, p + 7);
-  bar(p + 7, p + 1);
-  bar(p + 6, p + 7);
-  bar(p + 7, p + 7);
-
-  // Stack variable.
-  char stack[10000];
-  bar(&stack[0], &stack[100]);
-  bar(&stack[1000], &stack[9000]);
-  bar(&stack[500], &stack[10]);
-
-  baz(0, &stack[10]);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc (removed)
@@ -1,48 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2:halt_on_error=0 %run %t 2>&1 | FileCheck %s
-
-#include <assert.h>
-#include <stdlib.h>
-
-int foo(char *p, char *q) {
-  return p - q;
-}
-
-char global1[100] = {}, global2[100] = {};
-
-int main() {
-  // Heap allocated memory.
-  char *heap1 = (char *)malloc(42);
-  char *heap2 = (char *)malloc(42);
-
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(heap1, heap2);
-
-  // Global variables.
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(&global1[0], &global2[10]);
-
-  // Stack variables.
-  char stack1, stack2;
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(&stack1, &stack2);
-
-  // Mixtures.
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(heap1, &stack1);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(heap1, &global1[0]);
-  // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
-  foo(&stack1, &global1[0]);
-
-  free(heap1);
-  free(heap2);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cpp?p2=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cpp&p1=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-errors.cpp Mon Aug  5 09:48:12 2019
@@ -17,29 +17,29 @@ int main() {
   char *heap2 = (char *)malloc(42);
 
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(heap1, heap2);
 
   // Global variables.
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(&global1[0], &global2[10]);
 
   // Stack variables.
   char stack1, stack2;
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(&stack1, &stack2);
 
   // Mixtures.
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(heap1, &stack1);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(heap1, &global1[0]);
   // CHECK: ERROR: AddressSanitizer: invalid-pointer-pair
-  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cc:[[@LINE+1]]
+  // CHECK: #{{[0-9]+ .*}} in main {{.*}}invalid-pointer-pairs-subtract-errors.cpp:[[@LINE+1]]
   foo(&stack1, &global1[0]);
 
   free(heap1);

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cc (removed)
@@ -1,33 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2 %run %t
-
-#include <assert.h>
-#include <stdlib.h>
-
-int bar(char *p, char *q) {
-  return p - q;
-}
-
-char global[10000] = {};
-
-int main() {
-  // Heap allocated memory.
-  char *p = (char *)malloc(42);
-  int r = bar(p, p + 20);
-  free(p);
-
-  // Global variable.
-  bar(&global[0], &global[100]);
-  bar(&global[1000], &global[9000]);
-  bar(&global[500], &global[10]);
-  bar(&global[0], &global[10000]);
-
-  // Stack variable.
-  char stack[10000];
-  bar(&stack[0], &stack[100]);
-  bar(&stack[1000], &stack[9000]);
-  bar(&stack[500], &stack[10]);
-
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc (removed)
@@ -1,44 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
-
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=1 %run %t k 2>&1 | FileCheck %s -check-prefix=OK -allow-empty
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=1 not %run %t g 2>&1 | FileCheck %s -check-prefix=CMP -check-prefix=ALL-ERRORS
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=1 not %run %t s 2>&1 | FileCheck %s -check-prefix=SUB -check-prefix=ALL-ERRORS
-// RUN: %env_asan_opts=detect_invalid_pointer_pairs=1 not %run %t f 2>&1 | FileCheck %s -check-prefix=FREE -check-prefix=ALL-ERRORS
-
-#include <assert.h>
-#include <stdlib.h>
-
-int f(char c, char *p, char *q) {
-  // ALL-ERRORS: ERROR: AddressSanitizer: invalid-pointer-pair
-  // [[PTR1:0x[0-9a-f]+]] [[PTR2:0x[0-9a-f]+]]
-  switch (c) {
-  case 'g':
-    // CMP: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+1]]
-    return p > q;
-  case 's':
-    // SUB: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+1]]
-    return p - q;
-  case 'k': {
-    // OK-NOT: ERROR
-    char *p2 = p + 20;
-    return p > p2;
-  }
-  case 'f': {
-    char *p3 = p + 20;
-    free(p);
-    // FREE: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+2]]
-    // FREE: freed by thread
-    return p < p3;
-  }
-  }
-  assert(0);
-}
-
-int main(int argc, char **argv) {
-  char *p = (char *)malloc(42);
-  char *q = (char *)malloc(42);
-  assert(argc >= 2);
-  f(argv[1][0], p, q);
-  free(p);
-  free(q);
-}

Copied: compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cpp?p2=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cpp&p1=compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs.cpp Mon Aug  5 09:48:12 2019
@@ -13,10 +13,10 @@ int f(char c, char *p, char *q) {
   // [[PTR1:0x[0-9a-f]+]] [[PTR2:0x[0-9a-f]+]]
   switch (c) {
   case 'g':
-    // CMP: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+1]]
+    // CMP: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cpp:[[@LINE+1]]
     return p > q;
   case 's':
-    // SUB: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+1]]
+    // SUB: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cpp:[[@LINE+1]]
     return p - q;
   case 'k': {
     // OK-NOT: ERROR
@@ -26,7 +26,7 @@ int f(char c, char *p, char *q) {
   case 'f': {
     char *p3 = p + 20;
     free(p);
-    // FREE: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cc:[[@LINE+2]]
+    // FREE: #{{[0-9]+ .*}} in f({{char, char\*, char\*|char,char \*,char \*}}) {{.*}}invalid-pointer-pairs.cpp:[[@LINE+2]]
     // FREE: freed by thread
     return p < p3;
   }

Removed: compiler-rt/trunk/test/asan/TestCases/large_func_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/large_func_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/large_func_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/large_func_test.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-__attribute__((noinline))
-static void LargeFunction(int *x, int zero) {
-  x[0]++;
-  x[1]++;
-  x[2]++;
-  x[3]++;
-  x[4]++;
-  x[5]++;
-  x[6]++;
-  x[7]++;
-  x[8]++;
-  x[9]++;
-
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}}
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}
-  x[zero + 103]++;  // we should report this exact line
-  // atos incorrectly extracts the symbol name for the static functions on
-  // Darwin.
-  // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cc:}}[[@LINE-3]]
-  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cc}}:[[@LINE-4]]
-
-  x[10]++;
-  x[11]++;
-  x[12]++;
-  x[13]++;
-  x[14]++;
-  x[15]++;
-  x[16]++;
-  x[17]++;
-  x[18]++;
-  x[19]++;
-}
-
-int main(int argc, char **argv) {
-  int *x = new int[100];
-  LargeFunction(x, argc - 1);
-  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-1]]
-  // CHECK: {{0x.* is located 12 bytes to the right of 400-byte region}}
-  // CHECK: {{allocated by thread T0 here:}}
-  // CHECK-Linux: {{    #0 0x.* in operator new.*}}
-  // CHECK-Darwin: {{    #0 0x.* in .*_Zna.*}}
-  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-7]]
-  delete[] x;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/large_func_test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/large_func_test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/large_func_test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/large_func_test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/large_func_test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/large_func_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/large_func_test.cpp Mon Aug  5 09:48:12 2019
@@ -24,8 +24,8 @@ static void LargeFunction(int *x, int ze
   x[zero + 103]++;  // we should report this exact line
   // atos incorrectly extracts the symbol name for the static functions on
   // Darwin.
-  // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cc:}}[[@LINE-3]]
-  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cc}}:[[@LINE-4]]
+  // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cpp:}}[[@LINE-3]]
+  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cpp}}:[[@LINE-4]]
 
   x[10]++;
   x[11]++;
@@ -42,11 +42,11 @@ static void LargeFunction(int *x, int ze
 int main(int argc, char **argv) {
   int *x = new int[100];
   LargeFunction(x, argc - 1);
-  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-1]]
+  // CHECK: {{    #1 0x.* in main .*large_func_test.cpp:}}[[@LINE-1]]
   // CHECK: {{0x.* is located 12 bytes to the right of 400-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
   // CHECK-Linux: {{    #0 0x.* in operator new.*}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zna.*}}
-  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-7]]
+  // CHECK: {{    #1 0x.* in main .*large_func_test.cpp:}}[[@LINE-7]]
   delete[] x;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/log-path_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/log-path_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/log-path_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/log-path_test.cc (removed)
@@ -1,48 +0,0 @@
-// FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
-// XFAIL: android
-// UNSUPPORTED: ios
-//
-// The for loop in the backticks below requires bash.
-// REQUIRES: shell
-//
-// RUN: %clangxx_asan  %s -o %t
-
-// Regular run.
-// RUN: not %run %t 2> %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.out
-
-// Good log_path.
-// RUN: rm -f %t.log.*
-// RUN: %env_asan_opts=log_path=%t.log not %run %t 2> %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.log.*
-
-// Invalid log_path.
-// RUN: %env_asan_opts=log_path=/dev/null/INVALID not %run %t 2> %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-INVALID < %t.out
-
-// Too long log_path.
-// RUN: %env_asan_opts=log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \
-// RUN:   not %run %t 2> %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-LONG < %t.out
-
-// Run w/o errors should not produce any log.
-// RUN: rm -f %t.log.*
-// RUN: %env_asan_opts=log_path=%t.log  %run %t ARG ARG ARG
-// RUN: not cat %t.log.*
-
-// FIXME: log_path is not supported on Windows yet.
-// XFAIL: windows-msvc
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  if (argc > 2) return 0;
-  char *x = (char*)malloc(10);
-  memset(x, 0, 10);
-  int res = x[argc * 10];  // BOOOM
-  free(x);
-  return res;
-}
-// CHECK-ERROR: ERROR: AddressSanitizer
-// CHECK-INVALID: ERROR: Can't open file: /dev/null/INVALID
-// CHECK-LONG: ERROR: Path is too long: 01234

Removed: compiler-rt/trunk/test/asan/TestCases/longjmp.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/longjmp.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/longjmp.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/longjmp.cc (removed)
@@ -1,25 +0,0 @@
-// RUN: %clangxx_asan -O %s -o %t && %run %t
-
-#include <assert.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-static jmp_buf buf;
-
-int main() {
-  char x[32];
-  fprintf(stderr, "\nTestLongJmp\n");
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  if (0 == setjmp(buf))
-    longjmp(buf, 1);
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  // This assertion works only w/o UAR.
-  if (!__asan_get_current_fake_stack())
-    assert(!__asan_address_is_poisoned(x + 32));
-}

Removed: compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/lsan_annotations.cc (removed)
@@ -1,16 +0,0 @@
-// Check that LSan annotations work fine.
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t
-
-#include <sanitizer/lsan_interface.h>
-#include <stdlib.h>
-
-int main() {
-  int *x = new int;
-  __lsan_ignore_object(x);
-  {
-    __lsan::ScopedDisabler disabler;
-    double *y = new double;
-  }
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc (removed)
@@ -1,28 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NULL
-
-// REQUIRES: stable-runtime
-
-#include <stdio.h>
-#include <stdlib.h>
-
-static const size_t kMaxAllowedMallocSizePlusOne =
-#if __LP64__ || defined(_WIN64)
-    (1ULL << 40) + 1;
-#else
-    (3UL << 30) + 1;
-#endif
-
-int main() {
-  void *p = malloc(kMaxAllowedMallocSizePlusOne);
-  // CHECK: {{ERROR: AddressSanitizer: requested allocation size .* \(.* after adjustments for alignment, red zones etc\.\) exceeds maximum supported size}}
-  // CHECK: {{#0 0x.* in .*malloc}}
-  // CHECK: {{#1 0x.* in main .*malloc-size-too-big.cc:}}[[@LINE-3]]
-  // CHECK: SUMMARY: AddressSanitizer: allocation-size-too-big
-
-  printf("malloc returned: %zu\n", (size_t)p);
-  // CHECK-NULL: malloc returned: 0
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cpp?p2=compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cpp&p1=compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc-size-too-big.cpp Mon Aug  5 09:48:12 2019
@@ -18,7 +18,7 @@ int main() {
   void *p = malloc(kMaxAllowedMallocSizePlusOne);
   // CHECK: {{ERROR: AddressSanitizer: requested allocation size .* \(.* after adjustments for alignment, red zones etc\.\) exceeds maximum supported size}}
   // CHECK: {{#0 0x.* in .*malloc}}
-  // CHECK: {{#1 0x.* in main .*malloc-size-too-big.cc:}}[[@LINE-3]]
+  // CHECK: {{#1 0x.* in main .*malloc-size-too-big.cpp:}}[[@LINE-3]]
   // CHECK: SUMMARY: AddressSanitizer: allocation-size-too-big
 
   printf("malloc returned: %zu\n", (size_t)p);

Removed: compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc (removed)
@@ -1,27 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=0:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=1:fast_unwind_on_malloc=0 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=1:fast_unwind_on_malloc=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=malloc_context_size=2 not %run %t 2>&1 | FileCheck %s --check-prefix=TWO
-
-int main() {
-  char *x = new char[20];
-  delete[] x;
-  return x[0];
-
-  // CHECK: freed by thread T{{.*}} here:
-  // CHECK-NEXT: #0 0x{{.*}} in {{operator delete( )?\[\]|wrap__ZdaPv}}
-  // CHECK-NOT: #1 0x{{.*}}
-
-  // CHECK: previously allocated by thread T{{.*}} here:
-  // CHECK-NEXT: #0 0x{{.*}} in {{operator new( )?\[\]|wrap__Znam}}
-  // CHECK-NOT: #1 0x{{.*}}
-
-  // CHECK: SUMMARY: AddressSanitizer: heap-use-after-free
-
-  // TWO: previously allocated by thread T{{.*}} here:
-  // TWO-NEXT: #0 0x{{.*}}
-  // TWO-NEXT: #1 0x{{.*}} in main {{.*}}malloc_context_size.cc
-  // TWO: SUMMARY: AddressSanitizer: heap-use-after-free
-}

Copied: compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cpp?p2=compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cpp&p1=compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc_context_size.cpp Mon Aug  5 09:48:12 2019
@@ -22,6 +22,6 @@ int main() {
 
   // TWO: previously allocated by thread T{{.*}} here:
   // TWO-NEXT: #0 0x{{.*}}
-  // TWO-NEXT: #1 0x{{.*}} in main {{.*}}malloc_context_size.cc
+  // TWO-NEXT: #1 0x{{.*}} in main {{.*}}malloc_context_size.cpp
   // TWO: SUMMARY: AddressSanitizer: heap-use-after-free
 }

Removed: compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/malloc_fill.cc (removed)
@@ -1,22 +0,0 @@
-// Check that we fill malloc-ed memory correctly.
-// RUN: %clangxx_asan %s -o %t
-// RUN: %run %t | FileCheck %s
-// RUN: %env_asan_opts=max_malloc_fill_size=10:malloc_fill_byte=8 %run %t | FileCheck %s --check-prefix=CHECK-10-8
-// RUN: %env_asan_opts=max_malloc_fill_size=20:malloc_fill_byte=171 %run %t | FileCheck %s --check-prefix=CHECK-20-ab
-
-#include <stdio.h>
-int main(int argc, char **argv) {
-  // With asan allocator this makes sure we get memory from mmap.
-  static const int kSize = 1 << 25;
-  unsigned char *x = new unsigned char[kSize];
-  printf("-");
-  for (int i = 0; i <= 32; i++) {
-    printf("%02x", x[i]);
-  }
-  printf("-\n");
-  delete [] x;
-}
-
-// CHECK: -bebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebe-
-// CHECK-10-8: -080808080808080808080000000000000000000000000000000000000000000000-
-// CHECK-20-ab: -abababababababababababababababababababab00000000000000000000000000-

Removed: compiler-rt/trunk/test/asan/TestCases/max_redzone.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/max_redzone.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/max_redzone.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/max_redzone.cc (removed)
@@ -1,26 +0,0 @@
-// Test max_redzone runtime option.
-
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=max_redzone=32 %run %t 0 2>&1
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 1 2>&1
-// RUN: %clangxx_asan -O3 %s -o %t && %env_asan_opts=max_redzone=32 %run %t 0 2>&1
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 1 2>&1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <sanitizer/allocator_interface.h>
-
-int main(int argc, char **argv) {
-  if (argc < 2)
-    return 1;
-  bool large_redzone = atoi(argv[1]);
-  size_t before = __sanitizer_get_heap_size();
-  void *pp[10000];
-  for (int i = 0; i < 10000; ++i)
-    pp[i] = malloc(4096 - 64);
-  size_t after = __sanitizer_get_heap_size();
-  for (int i = 0; i < 10000; ++i)
-    free(pp[i]);
-  size_t diff = after - before;
-  return !(large_redzone ? diff > 46000000 : diff < 46000000);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/memcmp_strict_test.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=strict_memcmp=0 %run %t
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=strict_memcmp=1 not %run %t 2>&1 | FileCheck %s
-// Default to strict_memcmp=1.
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-#include <string.h>
-int main() {
-  char kFoo[] = "foo";
-  char kFubar[] = "fubar";
-  int res = memcmp(kFoo, kFubar, strlen(kFubar));
-  printf("res: %d\n", res);
-  // CHECK: AddressSanitizer: stack-buffer-overflow
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/memcmp_test.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// REQUIRES: compiler-rt-optimized
-
-#include <string.h>
-int main(int argc, char **argv) {
-  char a1[] = {static_cast<char>(argc), 2, 3, 4};
-  char a2[] = {1, static_cast<char>(2*argc), 3, 4};
-  int res = memcmp(a1, a2, 4 + argc);  // BOOM
-  // CHECK: AddressSanitizer: stack-buffer-overflow
-  // CHECK: {{#1.*memcmp}}
-  // CHECK: {{#2.*main}}
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/memset_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/memset_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/memset_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/memset_test.cc (removed)
@@ -1,71 +0,0 @@
-// Test that large memset/memcpy/memmove check the entire range.
-
-// RUN: %clangxx_asan -O0 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMSET
-// RUN: %clangxx_asan -O1 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMSET
-// RUN: %clangxx_asan -O2 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMSET
-// RUN: %clangxx_asan -O3 -DTEST_MEMSET %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMSET
-
-// RUN: %clangxx_asan -O0 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMCPY
-// RUN: %clangxx_asan -O1 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMCPY
-// RUN: %clangxx_asan -O2 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMCPY
-// RUN: %clangxx_asan -O3 -DTEST_MEMCPY %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMCPY
-
-// RUN: %clangxx_asan -O0 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMMOVE
-// RUN: %clangxx_asan -O1 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMMOVE
-// RUN: %clangxx_asan -O2 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMMOVE
-// RUN: %clangxx_asan -O3 -DTEST_MEMMOVE %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMMOVE
-
-// RUN: %clangxx_asan -O2 -DTEST_MEMCPY_SIZE_OVERFLOW %s -o %t && not %run %t 2>&1 | \
-// RUN:     FileCheck %s --check-prefix=CHECK-MEMCPY_SIZE_OVERFLOW
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <sanitizer/asan_interface.h>
-
-typedef void *(*memcpy_t)(void *, const void *, size_t);
-
-int main(int argc, char **argv) {
-  char * volatile p = (char *)malloc(3000);
-  __asan_poison_memory_region(p + 512, 32);
-#if defined(TEST_MEMSET)
-  memset(p, 0, 3000);
-  assert(p[1] == 0);
-  // CHECK-MEMSET: AddressSanitizer: use-after-poison on address
-  // CHECK-MEMSET: in {{.*}}memset
-#else
-  char * volatile q = (char *)malloc(3000);
-#if defined(TEST_MEMCPY)
-  memcpy(q, p, 3000);
-  // CHECK-MEMCPY: AddressSanitizer: use-after-poison on address
-  // On Mac, memmove and memcpy are the same. Accept either one.
-  // CHECK-MEMCPY: in {{.*(memmove|memcpy)}}
-#elif defined(TEST_MEMMOVE)
-  memmove(q, p, 3000);
-  // CHECK-MEMMOVE: AddressSanitizer: use-after-poison on address
-  // CHECK-MEMMOVE: in {{.*(memmove|memcpy)}}
-#elif defined(TEST_MEMCPY_SIZE_OVERFLOW)
-  volatile memcpy_t my_memcpy = &memcpy;
-  my_memcpy(p, q, -argc);
-  // CHECK-MEMCPY_SIZE_OVERFLOW: AddressSanitizer: negative-size-param: (size=-1)
-#endif
-  assert(q[1] == 0);
-  free(q);
-#endif
-  free(p);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/null_deref.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/null_deref.cc (removed)
@@ -1,24 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-__attribute__((noinline))
-// FIXME: Static symbols don't show up in PDBs. We can remove this once we start
-// using DWARF.
-#ifndef _MSC_VER
-static
-#endif
-void NullDeref(int *ptr) {
-  // CHECK: ERROR: AddressSanitizer: {{SEGV|access-violation}} on unknown address
-  // CHECK:   {{0x0*000.. .*pc 0x.*}}
-  ptr[10]++;  // BOOM
-  // atos on Mac cannot extract the symbol name correctly. Also, on FreeBSD 9.2
-  // the demangling function rejects local names with 'L' in front of them.
-  // CHECK: {{    #0 0x.* in .*NullDeref.*null_deref.cc}}
-}
-int main() {
-  NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in main.*null_deref.cc}}
-  // CHECK: AddressSanitizer can not provide additional info.
-}

Copied: compiler-rt/trunk/test/asan/TestCases/null_deref.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/null_deref.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/null_deref.cpp?p2=compiler-rt/trunk/test/asan/TestCases/null_deref.cpp&p1=compiler-rt/trunk/test/asan/TestCases/null_deref.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/null_deref.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/null_deref.cpp Mon Aug  5 09:48:12 2019
@@ -15,10 +15,10 @@ void NullDeref(int *ptr) {
   ptr[10]++;  // BOOM
   // atos on Mac cannot extract the symbol name correctly. Also, on FreeBSD 9.2
   // the demangling function rejects local names with 'L' in front of them.
-  // CHECK: {{    #0 0x.* in .*NullDeref.*null_deref.cc}}
+  // CHECK: {{    #0 0x.* in .*NullDeref.*null_deref.cpp}}
 }
 int main() {
   NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in main.*null_deref.cc}}
+  // CHECK: {{    #1 0x.* in main.*null_deref.cpp}}
   // CHECK: AddressSanitizer can not provide additional info.
 }

Removed: compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/on_error_callback.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// FIXME: Doesn't work with DLLs
-// XFAIL: win32-dynamic-asan
-
-#include <stdio.h>
-#include <stdlib.h>
-
-extern "C"
-void __asan_on_error() {
-  fprintf(stderr, "__asan_on_error called\n");
-  fflush(stderr);
-}
-
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: __asan_on_error called
-}

Removed: compiler-rt/trunk/test/asan/TestCases/partial_right.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/partial_right.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/partial_right.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/partial_right.cc (removed)
@@ -1,13 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-int main(int argc, char **argv) {
-  volatile int *x = (int*)malloc(2*sizeof(int) + 2);
-  int res = x[2];  // BOOOM
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}
-  // CHECK: [[ADDR:0x[01-9a-fa-f]+]] is located 0 bytes to the right of {{.*}}-byte region [{{.*}},{{.*}}[[ADDR]])
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/pass-object-byval.cc (removed)
@@ -1,40 +0,0 @@
-// Verify that objects passed by value get red zones and that the copy
-// constructor is called.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --implicit-check-not \
-// RUN:     Assertion{{.*}}failed
-
-// ASan instrumentation can't insert red-zones around inalloca parameters.
-// XFAIL: windows-msvc && asan-32-bits
-
-#include <cassert>
-
-class A {
- public:
-  A() : me(this) {}
-  A(const A &other) : me(this) {
-    for (int i = 0; i < 8; ++i) a[i] = other.a[i];
-  }
-
-  int a[8];
-  A *me;
-};
-
-int bar(A *a) {
-  int *volatile ptr = &a->a[0];
-  return *(ptr - 1);
-}
-
-void foo(A a) {
-  assert(a.me == &a);
-  bar(&a);
-}
-
-int main() {
-  A a;
-  foo(a);
-}
-
-// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow
-// CHECK: READ of size 4 at
-// CHECK: is located in stack of thread

Removed: compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/pass-struct-byval-uar.cc (removed)
@@ -1,38 +0,0 @@
-// Test that use-after-return works with arguments passed by value.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | \
-// RUN:     FileCheck --check-prefix=CHECK-NO-UAR %s
-// RUN: not %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | \
-// RUN:     FileCheck --check-prefix=CHECK-UAR %s
-//
-// On several architectures, the IR does not use byval arguments for foo() and
-// instead creates a copy in main() and gives foo() a pointer to the copy.  In
-// that case, ASAN has nothing to poison on return from foo() and will not
-// detect the UAR.
-// REQUIRES: x86_64-target-arch, linux, !android
-
-#include <cstdio>
-
-struct A {
-  int a[8];
-};
-
-A *foo(A a) {
-  return &a;
-}
-
-int main() {
-  A *a = foo(A());
-  a->a[0] = 7;
-  std::fprintf(stderr, "\n");  // Ensures some output is generated for FileCheck
-                               // to verify in the case where UAR is not
-                               // detected.
-}
-
-// CHECK-NO-UAR-NOT: ERROR: AddressSanitizer: stack-use-after-return
-// CHECK-NO-UAR-NOT: WRITE of size 4 at
-// CHECK-NO-UAR-NOT: Memory access at offset {{[0-9]+}} is inside this variable
-//
-// CHECK-UAR: ERROR: AddressSanitizer: stack-use-after-return
-// CHECK-UAR: WRITE of size 4 at
-// CHECK-UAR: Memory access at offset {{[0-9]+}} is inside this variable

Removed: compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/pass-struct-byval.cc (removed)
@@ -1,23 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-
-struct A {
-  int a[8];
-};
-
-int bar(A *a) {
-  int *volatile ptr = &a->a[0];
-  return *(ptr - 1);
-}
-
-void foo(A a) {
-  bar(&a);
-}
-
-int main() {
-  foo(A());
-}
-
-// CHECK: ERROR: AddressSanitizer: stack-buffer-underflow
-// CHECK: READ of size 4 at
-// CHECK: is located in stack of thread

Removed: compiler-rt/trunk/test/asan/TestCases/poison_partial.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/poison_partial.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/poison_partial.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/poison_partial.cc (removed)
@@ -1,19 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t      2>&1 | FileCheck %s
-// RUN: not %run %t heap 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=poison_partial=0 %run %t
-// RUN: %env_asan_opts=poison_partial=0 %run %t heap
-#include <string.h>
-char g[21];
-char *x;
-
-int main(int argc, char **argv) {
-  if (argc >= 2)
-    x = new char[21];
-  else
-    x = &g[0];
-  memset(x, 0, 21);
-  int *y = (int*)x;
-  return y[5];
-}
-// CHECK: 0 bytes to the right

Removed: compiler-rt/trunk/test/asan/TestCases/pr33372.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/pr33372.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/pr33372.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/pr33372.cc (removed)
@@ -1,39 +0,0 @@
-// RUN: %clangxx_asan -O0 -std=c++11 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 -std=c++11 %s -o %t && %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 -std=c++11 %s -o %t && %run %t 2>&1 | FileCheck %s
-
-// Test that we do not detect false buffer overflows cased by optimization when
-// when local variable replaced by a smaller global constant.
-// https://bugs.llvm.org/show_bug.cgi?id=33372
-
-#include <stdio.h>
-#include <string.h>
-
-struct A { int x, y, z; };
-struct B { A a; /*gap*/ long b; };
-B *bb;
-
-void test1() {
-  A a1 = {1, 1, 2};
-  B b1 = {a1, 6};
-  bb = new B(b1);
-}
-
-const char KKK[] = {1, 1, 2};
-char bbb[100000];
-
-void test2() {
-  char cc[sizeof(bbb)];
-  memcpy(cc, KKK , sizeof(KKK));
-  memcpy(bbb, cc, sizeof(bbb));
-}
-
-int main(int argc, char *argv[]) {
-  test1();
-  test2();
-  printf("PASSED");
-  return 0;
-}
-
-// CHECK-NOT: ERROR: AddressSanitizer
-// CHECK: PASSED

Removed: compiler-rt/trunk/test/asan/TestCases/print_summary.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/print_summary.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/print_summary.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/print_summary.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=SOURCE
-// RUN: %env_asan_opts=symbolize=false not %run %t 2>&1 | FileCheck %s --check-prefix=MODULE
-// RUN: %env_asan_opts=print_summary=false not %run %t 2>&1 | FileCheck %s --check-prefix=MISSING
-
-int main() {
-  char *x = new char[20];
-  delete[] x;
-  return x[0];
-  // SOURCE: ERROR: AddressSanitizer: heap-use-after-free
-  // SOURCE: SUMMARY: AddressSanitizer: heap-use-after-free {{.*}}print_summary.cc:[[@LINE-2]]{{.*}} main
-  // MODULE: ERROR: AddressSanitizer: heap-use-after-free
-  // MODULE: SUMMARY: AddressSanitizer: heap-use-after-free ({{.*}}+0x{{.*}})
-  // MISSING: ERROR: AddressSanitizer: heap-use-after-free
-  // MISSING-NOT: SUMMARY
-}

Copied: compiler-rt/trunk/test/asan/TestCases/print_summary.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/print_summary.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/print_summary.cpp?p2=compiler-rt/trunk/test/asan/TestCases/print_summary.cpp&p1=compiler-rt/trunk/test/asan/TestCases/print_summary.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/print_summary.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/print_summary.cpp Mon Aug  5 09:48:12 2019
@@ -8,7 +8,7 @@ int main() {
   delete[] x;
   return x[0];
   // SOURCE: ERROR: AddressSanitizer: heap-use-after-free
-  // SOURCE: SUMMARY: AddressSanitizer: heap-use-after-free {{.*}}print_summary.cc:[[@LINE-2]]{{.*}} main
+  // SOURCE: SUMMARY: AddressSanitizer: heap-use-after-free {{.*}}print_summary.cpp:[[@LINE-2]]{{.*}} main
   // MODULE: ERROR: AddressSanitizer: heap-use-after-free
   // MODULE: SUMMARY: AddressSanitizer: heap-use-after-free ({{.*}}+0x{{.*}})
   // MISSING: ERROR: AddressSanitizer: heap-use-after-free

Removed: compiler-rt/trunk/test/asan/TestCases/realloc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/realloc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/realloc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/realloc.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// Default is true (free on realloc to 0 size)
-// RUN: %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=allocator_frees_and_returns_null_on_realloc_zero=true %run %t 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=allocator_frees_and_returns_null_on_realloc_zero=false %run %t 2>&1 | FileCheck %s --check-prefix=NO-FREE
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main() {
-  void *p = malloc(42);
-  p = realloc(p, 0);
-  if (p) {
-    // NO-FREE: Allocated something on realloc(p, 0)
-    fprintf(stderr, "Allocated something on realloc(p, 0)\n");
-  } else {
-    // CHECK: realloc(p, 0) returned nullptr
-    fprintf(stderr, "realloc(p, 0) returned nullptr\n");
-  }
-  free(p);
-}

Removed: compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/scariness_score_test.cc (removed)
@@ -1,212 +0,0 @@
-// Test how we produce the scariness score.
-
-// RUN: %clangxx_asan -O0 %s -o %t
-// On OSX and Windows, alloc_dealloc_mismatch=1 isn't 100% reliable, so it's
-// off by default. It's safe for these tests, though, so we turn it on.
-// RUN: export %env_asan_opts=detect_stack_use_after_return=1:handle_abort=1:print_scariness=1:alloc_dealloc_mismatch=1
-// Make sure the stack is limited (may not be the default under GNU make)
-// RUN: ulimit -s 4096
-// RUN: not %run %t  1 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: not %run %t  2 2>&1 | FileCheck %s --check-prefix=CHECK2
-// RUN: not %run %t  3 2>&1 | FileCheck %s --check-prefix=CHECK3
-// RUN: not %run %t  4 2>&1 | FileCheck %s --check-prefix=CHECK4
-// RUN: not %run %t  5 2>&1 | FileCheck %s --check-prefix=CHECK5
-// RUN: not %run %t  6 2>&1 | FileCheck %s --check-prefix=CHECK6
-// RUN: not %run %t  7 2>&1 | FileCheck %s --check-prefix=CHECK7
-// RUN: not %run %t  8 2>&1 | FileCheck %s --check-prefix=CHECK8
-// RUN: not %run %t  9 2>&1 | FileCheck %s --check-prefix=CHECK9
-// RUN: not %run %t 10 2>&1 | FileCheck %s --check-prefix=CHECK10
-// RUN: not %run %t 11 2>&1 | FileCheck %s --check-prefix=CHECK11
-// RUN: not %run %t 12 2>&1 | FileCheck %s --check-prefix=CHECK12
-// RUN: not %run %t 13 2>&1 | FileCheck %s --check-prefix=CHECK13
-// RUN: not %run %t 14 2>&1 | FileCheck %s --check-prefix=CHECK14
-// RUN: not %run %t 15 2>&1 | FileCheck %s --check-prefix=CHECK15
-// RUN: not %run %t 16 2>&1 | FileCheck %s --check-prefix=CHECK16
-// RUN: not %run %t 17 2>&1 | FileCheck %s --check-prefix=CHECK17
-// RUN: not %run %t 18 2>&1 | FileCheck %s --check-prefix=CHECK18
-// RUN: not %run %t 19 2>&1 | FileCheck %s --check-prefix=CHECK19
-// RUN: not %run %t 20 2>&1 | FileCheck %s --check-prefix=CHECK20
-// RUN: not %run %t 21 2>&1 | FileCheck %s --check-prefix=CHECK21
-// RUN: not %run %t 22 2>&1 | FileCheck %s --check-prefix=CHECK22
-// RUN: not %run %t 23 2>&1 | FileCheck %s --check-prefix=CHECK23
-// RUN: not %run %t 24 2>&1 | FileCheck %s --check-prefix=CHECK24
-// RUN: not %run %t 25 2>&1 | FileCheck %s --check-prefix=CHECK25
-// RUN: not %run %t 26 2>&1 | FileCheck %s --check-prefix=CHECK26
-// RUN: not %run %t 27 2>&1 | FileCheck %s --check-prefix=CHECK27
-// Parts of the test are too platform-specific:
-// REQUIRES: x86_64-target-arch
-// REQUIRES: shell
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <algorithm>
-
-#include <sanitizer/asan_interface.h>
-
-enum ReadOrWrite { Read = 0, Write = 1 };
-
-struct S32 {
-  char x[32];
-};
-
-template<class T>
-void HeapBuferOverflow(int Idx, ReadOrWrite w) {
-  T *t = new T[100];
-  static T sink;
-  if (w)
-    t[100 + Idx] = T();
-  else
-    sink = t[100 + Idx];
-  delete [] t;
-}
-
-template<class T>
-void HeapUseAfterFree(int Idx, ReadOrWrite w) {
-  T *t = new T[100];
-  static T sink;
-  sink = t[0];
-  delete [] t;
-  if (w)
-    t[Idx] = T();
-  else
-    sink = t[Idx];
-}
-
-template<class T>
-void StackBufferOverflow(int Idx, ReadOrWrite w) {
-  T t[100];
-  static T sink;
-  sink = t[Idx];
-  if (w)
-    t[100 + Idx] = T();
-  else
-    sink = t[100 + Idx];
-}
-
-template<class T>
-T *LeakStack() {
-  T t[100];
-  static volatile T *x;
-  x = &t[0];
-  return (T*)x;
-}
-
-template<class T>
-void StackUseAfterReturn(int Idx, ReadOrWrite w) {
-  static T sink;
-  T *t = LeakStack<T>();
-  if (w)
-    t[100 + Idx] = T();
-  else
-    sink = t[100 + Idx];
-}
-
-char    g1[100];
-short   g2[100];
-int     g4[100];
-int64_t g8[100];
-S32     gm[100];
-
-void DoubleFree() {
-  int *x = new int;
-  static volatile int two = 2;
-  for (int i = 0; i < two; i++)
-    delete x;
-}
-
-void StackOverflow(int Idx) {
-  int some_stack[256];
-  static volatile int *x;
-  x = &some_stack[0];
-  if (Idx > 0)
-    StackOverflow(Idx - 1);
-}
-
-void UseAfterPoison() {
-  int buf[100];
-  __asan_poison_memory_region(buf, sizeof(buf));
-  static volatile int sink;
-  sink = buf[42];
-}
-
-int main(int argc, char **argv) {
-  size_t scale;
-  size_t offset;
-  __asan_get_shadow_mapping(&scale, &offset);
-  size_t grain = 1 << scale;
-
-  char arr[100];
-  static volatile int zero = 0;
-  static volatile int *zero_ptr = 0;
-  static volatile int *wild_addr = (int*)0x10000000; // System-dependent.
-  if (argc != 2) return 1;
-  int kind = atoi(argv[1]);
-  switch (kind) {
-    case 1: HeapBuferOverflow<char>(0, Read); break;
-    case 2: HeapBuferOverflow<int>(0, Read); break;
-    case 3: HeapBuferOverflow<short>(0, Write); break;
-    case 4: HeapBuferOverflow<int64_t>(
-        2 * std::max(1, (int)(grain / sizeof(int64_t))), Write); break;
-    case 5: HeapBuferOverflow<S32>(4, Write); break;
-    case 6: HeapUseAfterFree<char>(0, Read); break;
-    case 7: HeapUseAfterFree<int>(0, Write); break;
-    case 8: HeapUseAfterFree<int64_t>(0, Read); break;
-    case 9: HeapUseAfterFree<S32>(0, Write); break;
-    case 10: StackBufferOverflow<char>(0, Write); break;
-    case 11: StackBufferOverflow<int64_t>(0, Read); break;
-    case 12:
-      if (scale <= 3)
-        StackBufferOverflow<int>(16, Write);
-      else {
-        // At large shadow granularity, there is not enough redzone
-        // between stack elements to detect far-from-bounds.  Pretend
-        // that this test passes.
-        fprintf(stderr, "SCARINESS: 61 "
-                "(4-byte-write-stack-buffer-overflow-far-from-bounds)\n");
-        return 1;
-      }
-      break;
-    case 13: StackUseAfterReturn<char>(0, Read); break;
-    case 14: StackUseAfterReturn<S32>(0, Write); break;
-    case 15: g1[zero + 100] = 0; break;
-    case 16: gm[0] = gm[zero + 100 + 1]; break;
-    case 17: DoubleFree(); break;
-    case 18: StackOverflow(1000000); break;
-    case 19: *zero_ptr = 0; break;
-    case 20: *wild_addr = 0; break;
-    case 21: zero = *wild_addr; break;
-    case 22: ((void (*)(void))wild_addr)(); break;
-    case 23: delete (new int[10]); break;
-    case 24: free((char*)malloc(100) + 10); break;
-    case 25: memcpy(arr, arr+10, 20);  break;
-    case 26: UseAfterPoison(); break;
-    case 27: abort();
-    // CHECK1: SCARINESS: 12 (1-byte-read-heap-buffer-overflow)
-    // CHECK2: SCARINESS: 17 (4-byte-read-heap-buffer-overflow)
-    // CHECK3: SCARINESS: 33 (2-byte-write-heap-buffer-overflow)
-    // CHECK4: SCARINESS: 52 (8-byte-write-heap-buffer-overflow-far-from-bounds)
-    // CHECK5: SCARINESS: 55 (multi-byte-write-heap-buffer-overflow-far-from-bounds)
-    // CHECK6: SCARINESS: 40 (1-byte-read-heap-use-after-free)
-    // CHECK7: SCARINESS: 46 (4-byte-write-heap-use-after-free)
-    // CHECK8: SCARINESS: 51 (8-byte-read-heap-use-after-free)
-    // CHECK9: SCARINESS: 55 (multi-byte-write-heap-use-after-free)
-    // CHECK10: SCARINESS: 46 (1-byte-write-stack-buffer-overflow)
-    // CHECK11: SCARINESS: 38 (8-byte-read-stack-buffer-overflow)
-    // CHECK12: SCARINESS: 61 (4-byte-write-stack-buffer-overflow-far-from-bounds)
-    // CHECK13: SCARINESS: 50 (1-byte-read-stack-use-after-return)
-    // CHECK14: SCARINESS: 65 (multi-byte-write-stack-use-after-return)
-    // CHECK15: SCARINESS: 31 (1-byte-write-global-buffer-overflow)
-    // CHECK16: SCARINESS: 36 (multi-byte-read-global-buffer-overflow-far-from-bounds)
-    // CHECK17: SCARINESS: 42 (double-free)
-    // CHECK18: SCARINESS: 10 (stack-overflow)
-    // CHECK19: SCARINESS: 10 (null-deref)
-    // CHECK20: SCARINESS: 30 (wild-addr-write)
-    // CHECK21: SCARINESS: 20 (wild-addr-read)
-    // CHECK22: SCARINESS: 60 (wild-jump)
-    // CHECK23: SCARINESS: 10 (alloc-dealloc-mismatch)
-    // CHECK24: SCARINESS: 40 (bad-free)
-    // CHECK25: SCARINESS: 10 (memcpy-param-overlap)
-    // CHECK26: SCARINESS: 27 (4-byte-read-use-after-poison)
-    // CHECK27: SCARINESS: 10 (signal)
-  }
-}

Removed: compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/small_memcpy_test.cc (removed)
@@ -1,29 +0,0 @@
-// Test that small memcpy works correctly.
-
-// RUN: %clangxx_asan %s -o %t
-// RUN: not %run %t 8 24 2>&1 | FileCheck %s --check-prefix=CHECK
-// RUN: not %run %t 16 32 2>&1 | FileCheck %s --check-prefix=CHECK
-// RUN: not %run %t 24 40 2>&1 | FileCheck %s --check-prefix=CHECK
-// RUN: not %run %t 32 48 2>&1 | FileCheck %s --check-prefix=CHECK
-// RUN: not %run %t 40 56 2>&1 | FileCheck %s --check-prefix=CHECK
-// RUN: not %run %t 48 64 2>&1 | FileCheck %s --check-prefix=CHECK
-// REQUIRES: shadow-scale-3
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <sanitizer/asan_interface.h>
-
-int main(int argc, char **argv) {
-  assert(argc == 3);
-  size_t poison_from = atoi(argv[1]);
-  size_t poison_to = atoi(argv[2]);
-  assert(poison_from <= poison_to);
-  char A1[64], A2[64];
-  fprintf(stderr, "%zd %zd\n", poison_from, poison_to - poison_from);
-  __asan_poison_memory_region(&A1[0] + poison_from, poison_to - poison_from);
-  memcpy(A1, A2, sizeof(A1));
-// CHECK: AddressSanitizer: use-after-poison
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/speculative_load.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/speculative_load.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/speculative_load.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/speculative_load.cc (removed)
@@ -1,54 +0,0 @@
-// Verifies that speculative loads from unions do not happen under asan.
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1
-
-#include <sanitizer/asan_interface.h>
-
-struct S {
-  struct _long {
-      void* _pad;
-      const char* _ptr;
-  };
-
-  struct _short {
-    unsigned char _size;
-    char _ch[23];
-  };
-
-  union {
-    _short _s;
-    _long _l;
-  } _data;
-
-  S() {
-    _data._s._size = 0;
-    __asan_poison_memory_region(_data._s._ch, 23);
-  }
-
-  ~S() {
-    __asan_unpoison_memory_region(_data._s._ch, 23);
-  }
-
-  bool is_long() const {
-    return _data._s._size & 1;
-  }
-
-  const char* get_pointer() const {
-    return is_long() ? _data._l._ptr : _data._s._ch;
-  }
-};
-
-
-inline void side_effect(const void *arg) {
-  __asm__ __volatile__("" : : "r" (arg) : "memory");
-}
-
-int main(int argc, char **argv) {
-  S s;
-  side_effect(&s); // optimizer is too smart otherwise
-  const char *ptr = s.get_pointer();
-  side_effect(ptr); // force use ptr
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/speculative_load2.cc (removed)
@@ -1,24 +0,0 @@
-// Verifies that speculative loads from unions do not happen under asan.
-// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1
-// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1
-
-typedef union {
-  short q;
-  struct {
-    short x;
-    short y;
-    int for_alignment;
-  } w;
-} U;
-
-int main() {
-  char *buf = new char[2];
-  buf[0] = buf[1] = 0x0;
-  U *u = (U *)buf;
-  short result = u->q == 0 ? 0 : u->w.y;
-  delete[] buf;
-  return result;
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow-with-position.cc (removed)
@@ -1,45 +0,0 @@
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t -2 2>&1 | FileCheck --check-prefix=CHECK-m2 %s
-// RUN: not %run %t -1 2>&1 | FileCheck --check-prefix=CHECK-m1 %s
-// RUN: %run %t 0
-// RUN: %run %t 8
-// RUN: not %run %t 9  2>&1 | FileCheck --check-prefix=CHECK-9  %s
-// RUN: not %run %t 10 2>&1 | FileCheck --check-prefix=CHECK-10 %s
-// RUN: not %run %t 30 2>&1 | FileCheck --check-prefix=CHECK-30 %s
-// RUN: not %run %t 31 2>&1 | FileCheck --check-prefix=CHECK-31 %s
-// RUN: not %run %t 41 2>&1 | FileCheck --check-prefix=CHECK-41 %s
-// RUN: not %run %t 42 2>&1 | FileCheck --check-prefix=CHECK-42 %s
-// RUN: not %run %t 62 2>&1 | FileCheck --check-prefix=CHECK-62 %s
-// RUN: not %run %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s
-// RUN: not %run %t 73 2>&1 | FileCheck --check-prefix=CHECK-73 %s
-// RUN: not %run %t 74 2>&1 | FileCheck --check-prefix=CHECK-74 %s
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-int main(int argc, char **argv) {
-  assert(argc >= 2);
-  int idx = atoi(argv[1]);
-  char AAA[10], BBB[10], CCC[10];
-  memset(AAA, 0, sizeof(AAA));
-  memset(BBB, 0, sizeof(BBB));
-  memset(CCC, 0, sizeof(CCC));
-  int res = 0;
-  char *p = AAA + idx;
-  printf("AAA: %p\ny: %p\nz: %p\np: %p\n", AAA, BBB, CCC, p);
-  // make sure BBB and CCC are not removed;
-  return *(short*)(p) + BBB[argc % 2] + CCC[argc % 2];
-}
-// CHECK-m2: 'AAA'{{.*}} <== {{.*}}underflows this variable
-// CHECK-m1: 'AAA'{{.*}} <== {{.*}}partially underflows this variable
-// CHECK-9:  'AAA'{{.*}} <== {{.*}}partially overflows this variable
-// CHECK-10: 'AAA'{{.*}} <== {{.*}}overflows this variable
-// CHECK-30: 'BBB'{{.*}} <== {{.*}}underflows this variable
-// CHECK-31: 'BBB'{{.*}} <== {{.*}}partially underflows this variable
-// CHECK-41: 'BBB'{{.*}} <== {{.*}}partially overflows this variable
-// CHECK-42: 'BBB'{{.*}} <== {{.*}}overflows this variable
-// CHECK-62: 'CCC'{{.*}} <== {{.*}}underflows this variable
-// CHECK-63: 'CCC'{{.*}} <== {{.*}}partially underflows this variable
-// CHECK-73: 'CCC'{{.*}} <== {{.*}}partially overflows this variable
-// CHECK-74: 'CCC'{{.*}} <== {{.*}}overflows this variable
-// REQUIRES: shadow-scale-3

Removed: compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <string.h>
-int main(int argc, char **argv) {
-  char x[10];
-  memset(x, 0, 10);
-  int res = x[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*stack-buffer-overflow.cc:}}[[@LINE-2]]
-  // CHECK: {{Address 0x.* is located in stack of thread T0 at offset}}
-  // CHECK-NEXT: in{{.*}}main{{.*}}stack-buffer-overflow.cc
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-buffer-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -9,8 +9,8 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*stack-buffer-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*stack-buffer-overflow.cpp:}}[[@LINE-2]]
   // CHECK: {{Address 0x.* is located in stack of thread T0 at offset}}
-  // CHECK-NEXT: in{{.*}}main{{.*}}stack-buffer-overflow.cc
+  // CHECK-NEXT: in{{.*}}main{{.*}}stack-buffer-overflow.cpp
   return res;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-frame-demangle.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-#include <string.h>
-
-namespace XXX {
-struct YYY {
-  static int ZZZ(int x) {
-    char array[10];
-    memset(array, 0, 10);
-    return array[x];  // BOOOM
-    // CHECK: ERROR: AddressSanitizer: stack-buffer-overflow
-    // CHECK: READ of size 1 at
-    // CHECK: is located in stack of thread T0 at offset
-    // CHECK: XXX::YYY::ZZZ
-  }
-};
-}  // namespace XXX
-
-int main(int argc, char **argv) {
-  int res = XXX::YYY::ZZZ(argc + 10);
-  return res;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-oob-frames.cc (removed)
@@ -1,59 +0,0 @@
-// RUN: %clangxx_asan -O1 %s -o %t
-// RUN: not %run %t 0 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: not %run %t 1 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: not %run %t 2 2>&1 | FileCheck %s --check-prefix=CHECK2
-// RUN: not %run %t 3 2>&1 | FileCheck %s --check-prefix=CHECK3
-
-#define NOINLINE __attribute__((noinline))
-inline void break_optimization(void *arg) {
-  __asm__ __volatile__("" : : "r" (arg) : "memory");
-}
-
-NOINLINE static void Frame0(int frame, char *a, char *b, char *c) {
-  char s[4] = {0};
-  char *d = s;
-  break_optimization(&d);
-  switch (frame) {
-    case 3: a[5]++; break;
-    case 2: b[5]++; break;
-    case 1: c[5]++; break;
-    case 0: d[5]++; break;
-  }
-}
-NOINLINE static void Frame1(int frame, char *a, char *b) {
-  char c[4] = {0}; Frame0(frame, a, b, c);
-  break_optimization(0);
-}
-NOINLINE static void Frame2(int frame, char *a) {
-  char b[4] = {0}; Frame1(frame, a, b);
-  break_optimization(0);
-}
-NOINLINE static void Frame3(int frame) {
-  char a[4] = {0}; Frame2(frame, a);
-  break_optimization(0);
-}
-
-int main(int argc, char **argv) {
-  if (argc != 2) return 1;
-  Frame3(argv[1][0] - '0');
-}
-
-// CHECK0: AddressSanitizer: stack-buffer-overflow
-// CHECK0: #0{{.*}}Frame0
-// CHECK0: #1{{.*}}Frame1
-// CHECK0: #2{{.*}}Frame2
-// CHECK0: #3{{.*}}Frame3
-// CHECK0: is located in stack of thread T0 at offset
-// CHECK0-NEXT: #0{{.*}}Frame0
-//
-// CHECK1: AddressSanitizer: stack-buffer-overflow
-// CHECK1: is located in stack of thread T0 at offset
-// CHECK1-NEXT: #0{{.*}}Frame1
-//
-// CHECK2: AddressSanitizer: stack-buffer-overflow
-// CHECK2: is located in stack of thread T0 at offset
-// CHECK2-NEXT: #0{{.*}}Frame2
-//
-// CHECK3: AddressSanitizer: stack-buffer-overflow
-// CHECK3: is located in stack of thread T0 at offset
-// CHECK3-NEXT: #0{{.*}}Frame3

Removed: compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc (removed)
@@ -1,54 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-
-// This test when run with suppressions invokes undefined
-// behavior which can cause all sorts of bad things to happen
-// depending on how strcat() is implemented. For now only run
-// on platforms where we know the test passes.
-// REQUIRES: x86_64h-darwin || x86_64-darwin || i386-darwin || x86_64-linux || i386-linux
-// UNSUPPORTED: windows-msvc
-// UNSUPPORTED: android
-
-#include <string.h>
-
-
-// Don't inline function otherwise stacktrace changes.
-__attribute__((noinline)) void bad_function() {
-  char buffer[] = "hello\0XXX";
-  // CHECK: strcat-param-overlap: memory ranges
-  // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
-  // CHECK: {{#0 0x.* in .*strcat}}
-  // CHECK: {{#1 0x.* in bad_function.*strcat-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strcat-overlap.cc:}}[[@LINE+5]]
-  strcat(buffer, buffer + 1); // BOOM
-}
-
-int main(int argc, char **argv) {
-  bad_function();
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcat-overlap.cpp Mon Aug  5 09:48:12 2019
@@ -43,8 +43,8 @@ __attribute__((noinline)) void bad_funct
   // CHECK: strcat-param-overlap: memory ranges
   // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
   // CHECK: {{#0 0x.* in .*strcat}}
-  // CHECK: {{#1 0x.* in bad_function.*strcat-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strcat-overlap.cc:}}[[@LINE+5]]
+  // CHECK: {{#1 0x.* in bad_function.*strcat-overlap.cpp:}}[[@LINE+2]]
+  // CHECK: {{#2 0x.* in main .*strcat-overlap.cpp:}}[[@LINE+5]]
   strcat(buffer, buffer + 1); // BOOM
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc (removed)
@@ -1,48 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strcpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-
-// UNSUPPORTED: android
-
-#include <string.h>
-
-
-// Don't inline function otherwise stacktrace changes.
-__attribute__((noinline)) void bad_function() {
-  char buffer[] = "hello";
-  // CHECK: strcpy-param-overlap: memory ranges
-  // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
-  // CHECK: {{#0 0x.* in .*strcpy}}
-  // CHECK: {{#1 0x.* in bad_function.*strcpy-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strcpy-overlap.cc:}}[[@LINE+5]]
-  strcpy(buffer, buffer + 1); // BOOM
-}
-
-int main(int argc, char **argv) {
-  bad_function();
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcpy-overlap.cpp Mon Aug  5 09:48:12 2019
@@ -37,8 +37,8 @@ __attribute__((noinline)) void bad_funct
   // CHECK: strcpy-param-overlap: memory ranges
   // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
   // CHECK: {{#0 0x.* in .*strcpy}}
-  // CHECK: {{#1 0x.* in bad_function.*strcpy-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strcpy-overlap.cc:}}[[@LINE+5]]
+  // CHECK: {{#1 0x.* in bad_function.*strcpy-overlap.cpp:}}[[@LINE+2]]
+  // CHECK: {{#2 0x.* in main .*strcpy-overlap.cpp:}}[[@LINE+5]]
   strcpy(buffer, buffer + 1); // BOOM
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc (removed)
@@ -1,31 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// When built as C on Linux, strdup is transformed to __strdup.
-// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
-
-// FIXME: We fail to intercept strdup with the dynamic WinASan RTL, so it's not
-// in the stack trace.
-// XFAIL: win32-dynamic-asan
-
-#include <string.h>
-
-char kString[] = "foo";
-
-int main(int argc, char **argv) {
-  char *copy = strdup(kString);
-  int x = copy[4 + argc];  // BOOM
-  // CHECK: AddressSanitizer: heap-buffer-overflow
-  // CHECK: #0 {{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-2]]
-  // CHECK-LABEL: allocated by thread T{{.*}} here:
-  // CHECK: #{{[01]}} {{.*}}strdup
-  // CHECK: #{{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-6]]
-  // CHECK-LABEL: SUMMARY
-  // CHECK: strdup_oob_test.cc:[[@LINE-7]]
-  return x;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cpp Mon Aug  5 09:48:12 2019
@@ -21,11 +21,11 @@ int main(int argc, char **argv) {
   char *copy = strdup(kString);
   int x = copy[4 + argc];  // BOOM
   // CHECK: AddressSanitizer: heap-buffer-overflow
-  // CHECK: #0 {{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-2]]
+  // CHECK: #0 {{.*}}main {{.*}}strdup_oob_test.cpp:[[@LINE-2]]
   // CHECK-LABEL: allocated by thread T{{.*}} here:
   // CHECK: #{{[01]}} {{.*}}strdup
-  // CHECK: #{{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-6]]
+  // CHECK: #{{.*}}main {{.*}}strdup_oob_test.cpp:[[@LINE-6]]
   // CHECK-LABEL: SUMMARY
-  // CHECK: strdup_oob_test.cc:[[@LINE-7]]
+  // CHECK: strdup_oob_test.cpp:[[@LINE-7]]
   return x;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc (removed)
@@ -1,48 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncat" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-
-// UNSUPPORTED: android
-
-#include <string.h>
-
-
-// Don't inline function otherwise stacktrace changes.
-__attribute__((noinline)) void bad_function() {
-  char buffer[] = "hello\0XXX";
-  // CHECK: strncat-param-overlap: memory ranges
-  // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
-  // CHECK: {{#0 0x.* in .*strncat}}
-  // CHECK: {{#1 0x.* in bad_function.*strncat-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strncat-overlap.cc:}}[[@LINE+5]]
-  strncat(buffer, buffer + 1, 3); // BOOM
-}
-
-int main(int argc, char **argv) {
-  bad_function();
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncat-overlap.cpp Mon Aug  5 09:48:12 2019
@@ -37,8 +37,8 @@ __attribute__((noinline)) void bad_funct
   // CHECK: strncat-param-overlap: memory ranges
   // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
   // CHECK: {{#0 0x.* in .*strncat}}
-  // CHECK: {{#1 0x.* in bad_function.*strncat-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strncat-overlap.cc:}}[[@LINE+5]]
+  // CHECK: {{#1 0x.* in bad_function.*strncat-overlap.cpp:}}[[@LINE+2]]
+  // CHECK: {{#2 0x.* in main .*strncat-overlap.cpp:}}[[@LINE+5]]
   strncat(buffer, buffer + 1, 3); // BOOM
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc (removed)
@@ -1,29 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-
-// REQUIRES: compiler-rt-optimized
-// REQUIRES: stable-runtime
-
-#include <string.h>
-#include <stdlib.h>
-int main(int argc, char **argv) {
-  char *hello = (char*)malloc(6);
-  strcpy(hello, "hello");
-  char *short_buffer = (char*)malloc(9);
-  strncpy(short_buffer, hello, 10);  // BOOM
-  // CHECK: {{WRITE of size 10 at 0x.* thread T0}}
-  // CHECK-Linux: {{    #0 0x.* in .*strncpy}}
-  // CHECK-Darwin: {{    #0 0x.* in wrap_strncpy}}
-  // CHECK: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-4]]
-  // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}}
-  // CHECK: {{allocated by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]
-
-  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-13]]
-  return short_buffer[8];
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncpy-overflow.cpp Mon Aug  5 09:48:12 2019
@@ -16,14 +16,14 @@ int main(int argc, char **argv) {
   // CHECK: {{WRITE of size 10 at 0x.* thread T0}}
   // CHECK-Linux: {{    #0 0x.* in .*strncpy}}
   // CHECK-Darwin: {{    #0 0x.* in wrap_strncpy}}
-  // CHECK: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-4]]
+  // CHECK: {{    #1 0x.* in main .*strncpy-overflow.cpp:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]
+  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cpp:}}[[@LINE-10]]
 
   // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-13]]
+  // CHECK-Darwin: {{    #1 0x.* in main .*strncpy-overflow.cpp:}}[[@LINE-13]]
   return short_buffer[8];
 }

Removed: compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc (removed)
@@ -1,48 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O1 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O2 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-//
-// RUN: %clangxx_asan -O3 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-// RUN: echo "interceptor_via_fun:bad_function" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-// RUN: echo "interceptor_name:strncpy" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t
-
-// UNSUPPORTED: android
-
-#include <string.h>
-
-
-// Don't inline function otherwise stacktrace changes.
-__attribute__((noinline)) void bad_function() {
-  char buffer[] = "hello";
-  // CHECK: strncpy-param-overlap: memory ranges
-  // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
-  // CHECK: {{#0 0x.* in .*strncpy}}
-  // CHECK: {{#1 0x.* in bad_function.*strncpy-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strncpy-overlap.cc:}}[[@LINE+5]]
-  strncpy(buffer, buffer + 1, 5); // BOOM
-}
-
-int main(int argc, char **argv) {
-  bad_function();
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cpp?p2=compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cpp&p1=compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strncpy-overlap.cpp Mon Aug  5 09:48:12 2019
@@ -37,8 +37,8 @@ __attribute__((noinline)) void bad_funct
   // CHECK: strncpy-param-overlap: memory ranges
   // CHECK: [{{0x.*,[ ]*0x.*}}) and [{{0x.*,[ ]*0x.*}}) overlap
   // CHECK: {{#0 0x.* in .*strncpy}}
-  // CHECK: {{#1 0x.* in bad_function.*strncpy-overlap.cc:}}[[@LINE+2]]
-  // CHECK: {{#2 0x.* in main .*strncpy-overlap.cc:}}[[@LINE+5]]
+  // CHECK: {{#1 0x.* in bad_function.*strncpy-overlap.cpp:}}[[@LINE+2]]
+  // CHECK: {{#2 0x.* in main .*strncpy-overlap.cpp:}}[[@LINE+5]]
   strncpy(buffer, buffer + 1, 5); // BOOM
 }
 

Removed: compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-exec-relative-location.cc (removed)
@@ -1,48 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// If the executable is started from a different location, we should still
-// find the suppression file located relative to the location of the executable.
-// RUN: rm -rf %t-dir
-// RUN: mkdir -p %t-dir
-// RUN: %clangxx_asan -O0 %s -o %t-dir/exec
-// RUN: echo "interceptor_via_fun:crash_function" > \
-// RUN:   %t-dir/supp.txt
-// RUN: %env_asan_opts=suppressions='"supp.txt"' \
-// RUN:   %run %t-dir/exec 2>&1 | \
-// RUN:   FileCheck --check-prefix=CHECK-IGNORE %s
-// RUN: rm -rf %t-dir
-
-// If the wrong absolute path is given, we don't try to construct
-// a relative path with it.
-// RUN: %env_asan_opts=suppressions='"/absolute/path"' not %run %t 2>&1 | \
-// RUN:   FileCheck --check-prefix=CHECK-WRONG-FILE-NAME %s
-
-// Test that we reject directory as filename.
-// RUN: %env_asan_opts=suppressions='"folder/only/"' not %run %t 2>&1 | \
-// RUN:   FileCheck --check-prefix=CHECK-WRONG-FILE-NAME %s
-
-// XFAIL: android
-// XFAIL: windows-msvc
-// UNSUPPORTED: ios
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void crash_function() {
-  char *a = (char *)malloc(6);
-  free(a);
-  size_t len = strlen(a); // BOOM
-  fprintf(stderr, "strlen ignored, len = %zu\n", len);
-}
-
-int main() {
-  crash_function();
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-use-after-free
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-buffer-overflow
-// CHECK-IGNORE: ignored
-// CHECK-WRONG-FILE-NAME: failed to read suppressions file

Removed: compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-function.cc (removed)
@@ -1,35 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// RUN: echo "interceptor_via_fun:crash_function" > %t.supp
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-// RUN: %clangxx_asan -O3 %s -o %t && %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// FIXME: Windows symbolizer needs work to make this pass.
-// XFAIL: android,windows-msvc
-// UNSUPPORTED: ios
-
-// FIXME: atos does not work for inlined functions, yet llvm-symbolizer
-// does not always work with debug info on Darwin.
-// UNSUPPORTED: darwin
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void crash_function() {
-  char *a = (char *)malloc(6);
-  free(a);
-  size_t len = strlen(a); // BOOM
-  fprintf(stderr, "strlen ignored, len = %zu\n", len);
-}
-
-int main() {
-  crash_function();
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-use-after-free
-// CHECK-CRASH-NOT: strlen ignored
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-use-after-free
-// CHECK-IGNORE: strlen ignored

Removed: compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-interceptor.cc (removed)
@@ -1,24 +0,0 @@
-// Check that without suppressions, we catch the issue.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// RUN: echo "interceptor_name:strlen" > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// XFAIL: android
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main() {
-  char *a = (char *)malloc(6);
-  free(a);
-  size_t len = strlen(a); // BOOM
-  fprintf(stderr, "strlen ignored, len = %zu\n", len);
-}
-
-// CHECK-CRASH: AddressSanitizer: heap-use-after-free
-// CHECK-CRASH-NOT: strlen ignored
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-use-after-free
-// CHECK-IGNORE: strlen ignored

Removed: compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/suppressions-library.cc (removed)
@@ -1,43 +0,0 @@
-// RUN: %clangxx_asan -O0 -DSHARED_LIB %s %fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_asan -O0 %s -o %t %ld_flags_rpath_exe
-
-// Check that without suppressions, we catch the issue.
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
-
-// FIXME: Remove usage of backticks around basename below.
-// REQUIRES: shell
-
-// RUN: echo "interceptor_via_lib:"%xdynamiclib_filename > %t.supp
-// RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-
-// XFAIL: android
-// XFAIL: i386-netbsd
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if !defined(SHARED_LIB)
-
-void crash_function();
-
-int main(int argc, char *argv[]) {
-  crash_function();
-  return 0;
-}
-
-#else // SHARED_LIB
-
-void crash_function() {
-  char *a = (char *)malloc(6);
-  free(a);
-  size_t len = strlen(a); // BOOM
-  fprintf(stderr, "strlen ignored, %zu\n", len);
-}
-
-#endif // SHARED_LIB
-
-// CHECK-CRASH: AddressSanitizer: heap-use-after-free
-// CHECK-CRASH-NOT: strlen ignored
-// CHECK-IGNORE-NOT: AddressSanitizer: heap-use-after-free
-// CHECK-IGNORE: strlen ignored

Removed: compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc (removed)
@@ -1,49 +0,0 @@
-// RUN: %clangxx_asan %s -o %t && %run %t
-// http://code.google.com/p/address-sanitizer/issues/detail?id=147 (not fixed).
-// BROKEN: %clangxx_asan %s -o %t -static-libstdc++ && %run %t
-
-#include <stdio.h>
-static volatile int zero = 0;
-inline void pretend_to_do_something(void *x) {
-  __asm__ __volatile__("" : : "r" (x) : "memory");
-}
-
-__attribute__((noinline, no_sanitize_address))
-void ReallyThrow() {
-  fprintf(stderr, "ReallyThrow\n");
-  if (zero == 0)
-    throw 42;
-}
-
-__attribute__((noinline))
-void Throw() {
-  int a, b, c, d, e, f, g, h;
-  pretend_to_do_something(&a);
-  pretend_to_do_something(&b);
-  pretend_to_do_something(&c);
-  pretend_to_do_something(&d);
-  pretend_to_do_something(&e);
-  pretend_to_do_something(&f);
-  pretend_to_do_something(&g);
-  pretend_to_do_something(&h);
-  fprintf(stderr, "Throw stack = %p\n", &a);
-  ReallyThrow();
-}
-
-__attribute__((noinline))
-void CheckStack() {
-  int ar[100];
-  pretend_to_do_something(ar);
-  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);
-  for (int i = 0; i < 100; i++)
-    ar[i] = i;
-}
-
-int main(int argc, char** argv) {
-  try {
-    Throw();
-  } catch(int a) {
-    fprintf(stderr, "a = %d\n", a);
-  }
-  CheckStack();
-}

Removed: compiler-rt/trunk/test/asan/TestCases/throw_catch.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/throw_catch.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/throw_catch.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/throw_catch.cc (removed)
@@ -1,63 +0,0 @@
-// RUN: %clangxx_asan -O %s -o %t && %run %t
-
-#include <assert.h>
-#include <stdio.h>
-#include <sanitizer/asan_interface.h>
-
-__attribute__((noinline))
-void Throw() {
-  int local;
-  fprintf(stderr, "Throw:  %p\n", &local);
-  throw 1;
-}
-
-__attribute__((noinline))
-void ThrowAndCatch() {
-  int local;
-  try {
-    Throw();
-  } catch(...) {
-    fprintf(stderr, "Catch:  %p\n", &local);
-  }
-}
-
-__attribute__((noinline))
-void TestThrow() {
-  char x[32];
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  ThrowAndCatch();
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  // This assertion works only w/o UAR.
-  if (!__asan_get_current_fake_stack())
-    assert(!__asan_address_is_poisoned(x + 32));
-}
-
-__attribute__((noinline))
-void TestThrowInline() {
-  char x[32];
-  fprintf(stderr, "Before: %p poisoned: %d\n", &x,
-          __asan_address_is_poisoned(x + 32));
-  assert(__asan_address_is_poisoned(x + 32));
-  try {
-    Throw();
-  } catch(...) {
-    fprintf(stderr, "Catch\n");
-  }
-  fprintf(stderr, "After:  %p poisoned: %d\n",  &x,
-          __asan_address_is_poisoned(x + 32));
-  // FIXME: Invert this assertion once we fix
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=258
-  // This assertion works only w/o UAR.
-  if (!__asan_get_current_fake_stack())
-    assert(!__asan_address_is_poisoned(x + 32));
-}
-
-int main(int argc, char **argv) {
-  TestThrowInline();
-  TestThrow();
-}

Removed: compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/throw_invoke_test.cc (removed)
@@ -1,51 +0,0 @@
-// RUN: %clangxx_asan %s -o %t && %run %t
-// RUN: %clangxx_asan %s -o %t %linux_static_libstdcplusplus && %run %t
-
-#include <stdio.h>
-static volatile int zero = 0;
-inline void pretend_to_do_something(void *x) {
-  __asm__ __volatile__("" : : "r" (x) : "memory");
-}
-
-__attribute__((noinline))
-void ReallyThrow() {
-  fprintf(stderr, "ReallyThrow\n");
-  try {
-    if (zero == 0)
-      throw 42;
-    else if (zero == 1)
-      throw 1.;
-  } catch(double x) {
-  }
-}
-
-__attribute__((noinline))
-void Throw() {
-  int a, b, c, d, e;
-  pretend_to_do_something(&a);
-  pretend_to_do_something(&b);
-  pretend_to_do_something(&c);
-  pretend_to_do_something(&d);
-  pretend_to_do_something(&e);
-  fprintf(stderr, "Throw stack = %p\n", &a);
-  ReallyThrow();
-}
-
-__attribute__((noinline))
-void CheckStack() {
-  int ar[100];
-  pretend_to_do_something(ar);
-  for (int i = 0; i < 100; i++)
-    ar[i] = i;
-  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);
-}
-
-int main(int argc, char** argv) {
-  try {
-    Throw();
-  } catch(int a) {
-    fprintf(stderr, "a = %d\n", a);
-  }
-  CheckStack();
-}
-

Removed: compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/time_interceptor.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-// Test the time() interceptor.
-
-// There's no interceptor for time() on Windows yet.
-// XFAIL: windows-msvc
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-int main() {
-  time_t *tm = (time_t*)malloc(sizeof(time_t));
-  free(tm);
-  time_t t = time(tm);
-  printf("Time: %s\n", ctime(&t));  // NOLINT
-  // CHECK: use-after-free
-  // Regression check for
-  // https://code.google.com/p/address-sanitizer/issues/detail?id=321
-  // CHECK: SUMMARY
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/uar_and_exceptions.cc (removed)
@@ -1,40 +0,0 @@
-// Test that use-after-return works with exceptions.
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t
-
-#include <stdio.h>
-
-volatile char *g;
-
-#ifndef FRAME_SIZE
-# define FRAME_SIZE 100
-#endif
-
-#ifndef NUM_ITER
-# define NUM_ITER 4000
-#endif
-
-#ifndef DO_THROW
-# define DO_THROW 1
-#endif
-
-void Func(int depth) {
-  char frame[FRAME_SIZE];
-  g = &frame[0];
-  if (depth)
-    Func(depth - 1);
-  else if (DO_THROW)
-    throw 1;
-}
-
-int main(int argc, char **argv) {
-  for (int i = 0; i < NUM_ITER; i++) {
-    try {
-      Func(argc * 100);
-    } catch(...) {
-    }
-    if ((i % (NUM_ITER / 10)) == 0)
-      fprintf(stderr, "done [%d]\n", i);
-  }
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc (removed)
@@ -1,52 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t A 2>&1 | FileCheck --check-prefix=CHECK-A %s
-// RUN: not %run %t B 2>&1 | FileCheck --check-prefix=CHECK-B %s
-// RUN: not %run %t C 2>&1 | FileCheck --check-prefix=CHECK-C %s
-// RUN: not %run %t D 2>&1 | FileCheck --check-prefix=CHECK-D %s
-// RUN: not %run %t E 2>&1 | FileCheck --check-prefix=CHECK-E %s
-
-// RUN: not %run %t K 2>&1 | FileCheck --check-prefix=CHECK-K %s
-// RUN: not %run %t L 2>&1 | FileCheck --check-prefix=CHECK-L %s
-// RUN: not %run %t M 2>&1 | FileCheck --check-prefix=CHECK-M %s
-// RUN: not %run %t N 2>&1 | FileCheck --check-prefix=CHECK-N %s
-// RUN: not %run %t O 2>&1 | FileCheck --check-prefix=CHECK-O %s
-
-#include <sanitizer/asan_interface.h>
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  if (argc != 2) return 1;
-  char *x = new char[16];
-  memset(x, 0xab, 16);
-  int res = 1;
-  switch (argv[1][0]) {
-    case 'A': res = __sanitizer_unaligned_load16(x + 15); break;
-//  CHECK-A ERROR: AddressSanitizer: heap-buffer-overflow on address
-//  CHECK-A: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]
-//  CHECK-A: is located 0 bytes to the right of 16-byte region
-    case 'B': res = __sanitizer_unaligned_load32(x + 14); break;
-//  CHECK-B: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'C': res = __sanitizer_unaligned_load32(x + 13); break;
-//  CHECK-C: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'D': res = __sanitizer_unaligned_load64(x + 15); break;
-//  CHECK-D: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'E': res = __sanitizer_unaligned_load64(x + 9); break;
-//  CHECK-E: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-
-    case 'K': __sanitizer_unaligned_store16(x + 15, 0); break;
-//  CHECK-K ERROR: AddressSanitizer: heap-buffer-overflow on address
-//  CHECK-K: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]
-//  CHECK-K: is located 0 bytes to the right of 16-byte region
-    case 'L': __sanitizer_unaligned_store32(x + 15, 0); break;
-//  CHECK-L: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'M': __sanitizer_unaligned_store32(x + 13, 0); break;
-//  CHECK-M: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'N': __sanitizer_unaligned_store64(x + 10, 0); break;
-//  CHECK-N: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-    case 'O': __sanitizer_unaligned_store64(x + 14, 0); break;
-//  CHECK-O: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
-  }
-  delete x;
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cpp?p2=compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cpp&p1=compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/unaligned_loads_and_stores.cpp Mon Aug  5 09:48:12 2019
@@ -23,29 +23,29 @@ int main(int argc, char **argv) {
   switch (argv[1][0]) {
     case 'A': res = __sanitizer_unaligned_load16(x + 15); break;
 //  CHECK-A ERROR: AddressSanitizer: heap-buffer-overflow on address
-//  CHECK-A: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]
+//  CHECK-A: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-2]]
 //  CHECK-A: is located 0 bytes to the right of 16-byte region
     case 'B': res = __sanitizer_unaligned_load32(x + 14); break;
-//  CHECK-B: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-B: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'C': res = __sanitizer_unaligned_load32(x + 13); break;
-//  CHECK-C: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-C: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'D': res = __sanitizer_unaligned_load64(x + 15); break;
-//  CHECK-D: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-D: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'E': res = __sanitizer_unaligned_load64(x + 9); break;
-//  CHECK-E: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-E: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
 
     case 'K': __sanitizer_unaligned_store16(x + 15, 0); break;
 //  CHECK-K ERROR: AddressSanitizer: heap-buffer-overflow on address
-//  CHECK-K: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]
+//  CHECK-K: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-2]]
 //  CHECK-K: is located 0 bytes to the right of 16-byte region
     case 'L': __sanitizer_unaligned_store32(x + 15, 0); break;
-//  CHECK-L: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-L: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'M': __sanitizer_unaligned_store32(x + 13, 0); break;
-//  CHECK-M: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-M: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'N': __sanitizer_unaligned_store64(x + 10, 0); break;
-//  CHECK-N: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-N: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
     case 'O': __sanitizer_unaligned_store64(x + 14, 0); break;
-//  CHECK-O: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]
+//  CHECK-O: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]]
   }
   delete x;
   return res;

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-int main() {
-  char * volatile x = new char[10];
-  delete[] x;
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-delete.cc:}}[[@LINE-4]]
-  // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
-  // CHECK: {{freed by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in operator delete\[\]}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-10]]
-
-  // CHECK: {{previously allocated by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in operator new\[\]}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-16]]
-
-  // CHECK: Shadow byte legend (one shadow byte represents {{[0-9]+}} application bytes):
-  // CHECK: Global redzone:
-  // CHECK: ASan internal:
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-delete.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-delete.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-delete.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-delete.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-delete.cpp Mon Aug  5 09:48:12 2019
@@ -12,17 +12,17 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-delete.cc:}}[[@LINE-4]]
+  // CHECK: {{    #0 0x.* in main .*use-after-delete.cpp:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in operator delete\[\]}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-10]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-10]]
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in operator new\[\]}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-16]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-16]]
 
   // CHECK: Shadow byte legend (one shadow byte represents {{[0-9]+}} application bytes):
   // CHECK: Global redzone:

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc (removed)
@@ -1,35 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// REQUIRES: stable-runtime
-
-// Test use-after-free report in the case when access is at the right border of
-// the allocation.
-
-#include <stdlib.h>
-int main() {
-  volatile char *x = (char*)malloc(sizeof(char));
-  free((void*)x);
-  *x = 42;
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-  // CHECK: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-free-right.cc:}}[[@LINE-4]]
-  // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
-  // CHECK: {{freed by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-10]]
-
-  // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-13]]
-
-  // CHECK: {{previously allocated by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-19]]
-
-  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-22]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-free-right.cpp Mon Aug  5 09:48:12 2019
@@ -15,21 +15,21 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-free-right.cc:}}[[@LINE-4]]
+  // CHECK: {{    #0 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-10]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-10]]
 
   // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-13]]
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-13]]
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-19]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-19]]
 
   // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-22]]
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-22]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-free.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-free.cc (removed)
@@ -1,35 +0,0 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os --check-prefix=CHECK
-// REQUIRES: stable-runtime
-
-#include <stdlib.h>
-int main() {
-  char *x = (char*)malloc(10 * sizeof(char));
-  free(x);
-  return x[5];
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-free.cc:}}[[@LINE-4]]
-  // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
-  // CHECK: {{freed by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-10]]
-
-  // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-13]]
-
-  // CHECK: {{previously allocated by thread T0 here:}}
-
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-19]]
-
-  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-22]]
-  // CHECK: Shadow byte legend (one shadow byte represents {{[0-9]+}} application bytes):
-  // CHECK: Global redzone:
-  // CHECK: ASan internal:
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-free.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-free.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-free.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-free.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-free.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-free.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-free.cpp Mon Aug  5 09:48:12 2019
@@ -12,23 +12,23 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-free.cc:}}[[@LINE-4]]
+  // CHECK: {{    #0 0x.* in main .*use-after-free.cpp:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-10]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cpp:}}[[@LINE-10]]
 
   // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-13]]
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cpp:}}[[@LINE-13]]
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-19]]
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cpp:}}[[@LINE-19]]
 
   // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:}}[[@LINE-22]]
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cpp:}}[[@LINE-22]]
   // CHECK: Shadow byte legend (one shadow byte represents {{[0-9]+}} application bytes):
   // CHECK: Global redzone:
   // CHECK: ASan internal:

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc (removed)
@@ -1,20 +0,0 @@
-// Check that __asan_poison_memory_region works.
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
-//
-// Check that we can disable it
-// RUN: %env_asan_opts=allow_user_poisoning=0 %run %t
-
-#include <stdlib.h>
-
-extern "C" void __asan_poison_memory_region(void *, size_t);
-
-int main(int argc, char **argv) {
-  char *x = new char[16];
-  x[10] = 0;
-  __asan_poison_memory_region(x, 16);
-  int res = x[argc * 10];  // BOOOM
-  // CHECK: ERROR: AddressSanitizer: use-after-poison
-  // CHECK: main{{.*}}use-after-poison.cc:[[@LINE-2]]
-  delete [] x;
-  return res;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-poison.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-poison.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-poison.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-poison.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-poison.cpp Mon Aug  5 09:48:12 2019
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
   __asan_poison_memory_region(x, 16);
   int res = x[argc * 10];  // BOOOM
   // CHECK: ERROR: AddressSanitizer: use-after-poison
-  // CHECK: main{{.*}}use-after-poison.cc:[[@LINE-2]]
+  // CHECK: main{{.*}}use-after-poison.cpp:[[@LINE-2]]
   delete [] x;
   return res;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-#include <functional>
-
-int main() {
-  std::function<int()> f;
-  {
-    int x = 0;
-    f = [&x]() {
-      return x;  // BOOM
-      // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-      // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cc:[[@LINE-2]]
-    };
-  }
-  return f();  // BOOM
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-capture.cpp Mon Aug  5 09:48:12 2019
@@ -10,7 +10,7 @@ int main() {
     f = [&x]() {
       return x;  // BOOM
       // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-      // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cc:[[@LINE-2]]
+      // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp:[[@LINE-2]]
     };
   }
   return f();  // BOOM

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-conversion.cc (removed)
@@ -1,50 +0,0 @@
-// RUN: %clangxx_asan -O0 -fsanitize-address-use-after-scope %s -o %t
-
-// RUN: not %run %t 'A' 2>&1 | FileCheck %s
-// RUN: not %run %t 'B' 2>&1 | FileCheck %s
-
-// Missing lifetime markers in test_a
-// https://bugs.llvm.org/show_bug.cgi?id=34353
-// XFAIL: *
-
-struct B {
-  B() : p('B') {}
-  char p;
-};
-
-struct C {
-  const char *p;
-  explicit C(const char *c) : p(c) {}
-  C(const B &b) : p(&b.p) {} // NOLINT
-};
-
-struct A {
-  char p;
-  explicit A() : p('C') {}
-  const operator C() const { return C(&p); }
-};
-
-volatile char r;
-void test_a() {
-  C s = A();
-  r = *s.p;
-}
-
-void test_b() {
-  C s = B();
-  r = *s.p;
-}
-
-int main(int argc, char **argv) {
-  switch (argv[1][0]) {
-  case 'A':
-    test_a();
-    return 0;
-  case 'B':
-    test_b();
-    return 0;
-  }
-  return 1;
-}
-
-// CHECK: ERROR: AddressSanitizer: stack-use-after-scope

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-#include <stdio.h>
-
-struct IntHolder {
-  explicit IntHolder(int *val = 0) : val_(val) { }
-  ~IntHolder() {
-    printf("Value: %d\n", *val_);  // BOOM
-    // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-    // CHECK:  #0 0x{{.*}} in IntHolder::~IntHolder{{.*}}.cc:[[@LINE-2]]
-  }
-  void set(int *val) { val_ = val; }
-  int *get() { return val_; }
-
-  int *val_;
-};
-
-int main(int argc, char *argv[]) {
-  // It is incorrect to use "x" int IntHolder destructor, because "x" is
-  // "destroyed" earlier as it's declared later.
-  IntHolder holder;
-  int x = argc;
-  holder.set(&x);
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-dtor-order.cpp Mon Aug  5 09:48:12 2019
@@ -8,7 +8,7 @@ struct IntHolder {
   ~IntHolder() {
     printf("Value: %d\n", *val_);  // BOOM
     // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-    // CHECK:  #0 0x{{.*}} in IntHolder::~IntHolder{{.*}}.cc:[[@LINE-2]]
+    // CHECK:  #0 0x{{.*}} in IntHolder::~IntHolder{{.*}}.cpp:[[@LINE-2]]
   }
   void set(int *val) { val_ = val; }
   int *get() { return val_; }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-goto.cc (removed)
@@ -1,73 +0,0 @@
-// RUN: %clangxx_asan -O0 -fsanitize-address-use-after-scope %s -o %t && %run %t
-
-// Function jumps over variable initialization making lifetime analysis
-// ambiguous. Asan should ignore such variable and program must not fail.
-
-#include <stdlib.h>
-
-int *ptr;
-
-void f1(int cond) {
-  if (cond)
-    goto label;
-  int tmp;
-
- label:
-  ptr = &tmp;
-  *ptr = 5;
-}
-
-void f2(int cond) {
-  switch (cond) {
-  case 1: {
-    ++cond;
-    int tmp;
-    ptr = &tmp;
-    exit(0);
-  case 2:
-    ptr = &tmp;
-    *ptr = 5;
-    exit(0);
-  }
-  }
-}
-
-void f3(int cond) {
-  {
-    int tmp;
-    goto l2;
-  l1:
-    ptr = &tmp;
-    *ptr = 5;
-
-    exit(0);
-  }
- l2:
-  goto l1;
-}
-
-void use(int *x) {
-  static int c = 10;
-  if (--c == 0)
-    exit(0);
-  (*x)++;
-}
-
-void f4() {
-  {
-    int x;
- l2:
-    use(&x);
-    goto l1;
-  }
- l1:
-  goto l2;
-}
-
-int main() {
-  f1(1);
-  f2(1);
-  f3(1);
-  f4();
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc (removed)
@@ -1,15 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-int *p;
-bool b = true;
-
-int main() {
-  if (b) {
-    int x[5];
-    p = x+1;
-  }
-  return *p;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}.cc:[[@LINE-2]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-if.cpp Mon Aug  5 09:48:12 2019
@@ -11,5 +11,5 @@ int main() {
   }
   return *p;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}.cpp:[[@LINE-2]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc (removed)
@@ -1,28 +0,0 @@
-// Test with "-O2" only to make sure inlining (leading to use-after-scope)
-// happens. "always_inline" is not enough, as Clang doesn't emit
-// llvm.lifetime intrinsics at -O0.
-//
-// RUN: %clangxx_asan -O2 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-int *arr;
-
-__attribute__((always_inline))
-void inlined(int arg) {
-  int x[5];
-  for (int i = 0; i < arg; i++) x[i] = i;
-  arr = x;
-}
-
-int main(int argc, char *argv[]) {
-  inlined(argc);
-  return arr[argc - 1];  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK: READ of size 4 at 0x{{.*}} thread T0
-  // CHECK:   #0 0x{{.*}} in main
-  // CHECK:      {{.*}}use-after-scope-inlined.cc:[[@LINE-4]]
-  // CHECK: Address 0x{{.*}} is located in stack of thread T0 at offset [[OFFSET:[^ ]*]] in frame
-  // CHECK:      {{.*}} in main
-  // CHECK:   This frame has
-  // CHECK:     {{\[}}[[OFFSET]], {{.*}}) 'x.i' (line [[@LINE-15]])
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-inlined.cpp Mon Aug  5 09:48:12 2019
@@ -20,7 +20,7 @@ int main(int argc, char *argv[]) {
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
   // CHECK: READ of size 4 at 0x{{.*}} thread T0
   // CHECK:   #0 0x{{.*}} in main
-  // CHECK:      {{.*}}use-after-scope-inlined.cc:[[@LINE-4]]
+  // CHECK:      {{.*}}use-after-scope-inlined.cpp:[[@LINE-4]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T0 at offset [[OFFSET:[^ ]*]] in frame
   // CHECK:      {{.*}} in main
   // CHECK:   This frame has

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc (removed)
@@ -1,17 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-volatile int *p;
-
-int main() {
-  // Variable goes in and out of scope.
-  for (int i = 0; i < 3; ++i) {
-    int x[3] = {i, i, i};
-    p = x + i;
-  }
-  return *p;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-bug.cc:[[@LINE-2]]
-  // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
-  // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-bug.cpp Mon Aug  5 09:48:12 2019
@@ -11,7 +11,7 @@ int main() {
   }
   return *p;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-bug.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-bug.cpp:[[@LINE-2]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
   // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc (removed)
@@ -1,18 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-
-int *p;
-
-int main() {
-  for (int i = 0; i < 3; i++) {
-    int x;
-    p = &x;
-  }
-  return *p;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-removed.cc:[[@LINE-2]]
-  // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
-  // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop-removed.cpp Mon Aug  5 09:48:12 2019
@@ -12,7 +12,7 @@ int main() {
   }
   return *p;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-removed.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-loop-removed.cpp:[[@LINE-2]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
   // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc (removed)
@@ -1,14 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-int *p[3];
-
-int main() {
-  for (int i = 0; i < 3; i++) {
-    int x;
-    p[i] = &x;
-  }
-  return **p;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK: #0 0x{{.*}} in main {{.*}}.cc:[[@LINE-2]]
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-loop.cpp Mon Aug  5 09:48:12 2019
@@ -10,5 +10,5 @@ int main() {
   }
   return **p;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK: #0 0x{{.*}} in main {{.*}}.cc:[[@LINE-2]]
+  // CHECK: #0 0x{{.*}} in main {{.*}}.cpp:[[@LINE-2]]
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-nobug.cc (removed)
@@ -1,16 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && %run %t
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int *p[3];
-
-int main() {
-  // Variable goes in and out of scope.
-  for (int i = 0; i < 3; i++) {
-    int x;
-    p[i] = &x;
-  }
-  printf("PASSED\n");
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-
-struct IntHolder {
-  int val;
-};
-
-const IntHolder *saved;
-
-void save(const IntHolder &holder) {
-  saved = &holder;
-}
-
-int main(int argc, char *argv[]) {
-  save({argc});
-  int x = saved->val;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp.cc:[[@LINE-2]]
-  return x;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp.cpp Mon Aug  5 09:48:12 2019
@@ -16,6 +16,6 @@ int main(int argc, char *argv[]) {
   save({argc});
   int x = saved->val;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp.cpp:[[@LINE-2]]
   return x;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc (removed)
@@ -1,20 +0,0 @@
-// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-
-struct IntHolder {
-  const IntHolder& Self() const {
-    return *this;
-  }
-  int val = 3;
-};
-
-const IntHolder *saved;
-
-int main(int argc, char *argv[]) {
-  saved = &IntHolder().Self();
-  int x = saved->val;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp2.cc:[[@LINE-2]]
-  return x;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-temp2.cpp Mon Aug  5 09:48:12 2019
@@ -15,6 +15,6 @@ int main(int argc, char *argv[]) {
   saved = &IntHolder().Self();
   int x = saved->val;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp2.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp2.cpp:[[@LINE-2]]
   return x;
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc (removed)
@@ -1,74 +0,0 @@
-// RUN: %clangxx_asan %stdcxx11 -O0 -fsanitize-address-use-after-scope %s -o %t
-// RUN: not %run %t 0 2>&1 | FileCheck %s
-// RUN: not %run %t 1 2>&1 | FileCheck %s
-// RUN: not %run %t 2 2>&1 | FileCheck %s
-// RUN: not %run %t 3 2>&1 | FileCheck %s
-// RUN: not %run %t 4 2>&1 | FileCheck %s
-// RUN: not %run %t 5 2>&1 | FileCheck %s
-// RUN: not %run %t 6 2>&1 | FileCheck %s
-// RUN: not %run %t 7 2>&1 | FileCheck %s
-// RUN: not %run %t 8 2>&1 | FileCheck %s
-// RUN: not %run %t 9 2>&1 | FileCheck %s
-// RUN: not %run %t 10 2>&1 | FileCheck %s
-
-#include <stdlib.h>
-#include <string>
-#include <vector>
-
-template <class T> struct Ptr {
-  void Store(T *ptr) { t = ptr; }
-
-  void Access() { *t = {}; }
-
-  T *t;
-};
-
-template <class T, size_t N> struct Ptr<T[N]> {
-  using Type = T[N];
-  void Store(Type *ptr) { t = *ptr; }
-
-  void Access() { *t = {}; }
-
-  T *t;
-};
-
-template <class T> __attribute__((noinline)) void test() {
-  Ptr<T> ptr;
-  {
-    T x;
-    ptr.Store(&x);
-  }
-
-  ptr.Access();
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #{{[0-9]+}} 0x{{.*}} in {{(void )?test.*\((void)?\) .*}}use-after-scope-types.cc
-  // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
-  // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
-}
-
-int main(int argc, char **argv) {
-  using Tests = void (*)();
-  Tests tests[] = {
-    &test<bool>,
-    &test<char>,
-    &test<int>,
-    &test<double>,
-    &test<float>,
-    &test<void*>,
-    &test<std::vector<std::string>>,
-    &test<int[3]>,
-    &test<int[1000]>,
-    &test<char[3]>,
-    &test<char[1000]>,
-  };
-
-  int n = atoi(argv[1]);
-  if (n == sizeof(tests) / sizeof(tests[0])) {
-    for (auto te : tests)
-      te();
-  } else {
-    tests[n]();
-  }
-
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope-types.cpp Mon Aug  5 09:48:12 2019
@@ -41,7 +41,7 @@ template <class T> __attribute__((noinli
 
   ptr.Access();
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #{{[0-9]+}} 0x{{.*}} in {{(void )?test.*\((void)?\) .*}}use-after-scope-types.cc
+  // CHECK:  #{{[0-9]+}} 0x{{.*}} in {{(void )?test.*\((void)?\) .*}}use-after-scope-types.cpp
   // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
   // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
 }

Removed: compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc (removed)
@@ -1,21 +0,0 @@
-// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-// -fsanitize-address-use-after-scope is now on by default:
-// RUN: %clangxx_asan -O1 %s -o %t && \
-// RUN:     not %run %t 2>&1 | FileCheck %s
-
-volatile int *p = 0;
-
-int main() {
-  {
-    int x = 0;
-    p = &x;
-  }
-  *p = 5;  // BOOM
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope.cc:[[@LINE-2]]
-  // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
-  // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
-  return 0;
-}

Copied: compiler-rt/trunk/test/asan/TestCases/use-after-scope.cpp (from r367886, compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/use-after-scope.cpp?p2=compiler-rt/trunk/test/asan/TestCases/use-after-scope.cpp&p1=compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc&r1=367886&r2=367887&rev=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/use-after-scope.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/use-after-scope.cpp Mon Aug  5 09:48:12 2019
@@ -14,7 +14,7 @@ int main() {
   }
   *p = 5;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope.cpp:[[@LINE-2]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
   // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
   return 0;

Removed: compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/verbose-log-path_test.cc (removed)
@@ -1,26 +0,0 @@
-// RUN: rm -rf %t-dir && mkdir -p %t-dir
-// RUN: %clangxx_asan %s -o %t-dir/verbose-log-path_test-binary
-
-// The glob below requires bash.
-// REQUIRES: shell
-
-// Good log_path.
-// RUN: rm -f %t-dir/asan.log.*
-// RUN: %env_asan_opts=log_path=%t-dir/asan.log:log_exe_name=1 not %run %t-dir/verbose-log-path_test-binary 2> %t.out
-// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t-dir/asan.log.verbose-log-path_test-binary.*
-
-// FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now.
-// XFAIL: windows-msvc,android
-// UNSUPPORTED: ios
-
-#include <stdlib.h>
-#include <string.h>
-int main(int argc, char **argv) {
-  if (argc > 2) return 0;
-  char *x = (char*)malloc(10);
-  memset(x, 0, 10);
-  int res = x[argc * 10];  // BOOOM
-  free(x);
-  return res;
-}
-// CHECK-ERROR: ERROR: AddressSanitizer

Removed: compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/vla_chrome_testcase.cc (removed)
@@ -1,30 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-
-// This is reduced testcase based on Chromium code.
-// See http://reviews.llvm.org/D6055?vs=on&id=15616&whitespace=ignore-all#toc.
-
-#include <stdint.h>
-#include <assert.h>
-
-int a = 7;
-int b;
-int c;
-int *p;
-
-__attribute__((noinline)) void fn3(int *first, int second) {
-}
-
-int main() {
-  int d = b && c;
-  int e[a]; // NOLINT
-  assert(!(reinterpret_cast<uintptr_t>(e) & 31L));
-  int f;
-  if (d)
-    fn3(&f, sizeof 0 * (&c - e));
-  e[a] = 0;
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 4 at [[ADDR]] thread T0
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/vla_condition_overflow.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-// REQUIRES: stable-runtime
-
-#include <assert.h>
-#include <stdint.h>
-
-__attribute__((noinline)) void foo(int index, int len) {
-  if (index > len) {
-    char str[len]; //NOLINT
-    assert(!(reinterpret_cast<uintptr_t>(str) & 31L));
-    str[index] = '1'; // BOOM
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-  }
-}
-
-int main(int argc, char **argv) {
-  foo(33, 10);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/vla_loop_overfow.cc (removed)
@@ -1,22 +0,0 @@
-// RUN: %clangxx_asan -O0 -mllvm -asan-instrument-dynamic-allocas %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck %s
-//
-// REQUIRES: stable-runtime
-
-#include <assert.h>
-#include <stdint.h>
-
-void foo(int index, int len) {
-  for (int i = 1; i < len; ++i) {
-    char array[len]; // NOLINT
-    assert(!(reinterpret_cast<uintptr_t>(array) & 31L));
-    array[index + i] = 0;
-// CHECK: ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
-// CHECK: WRITE of size 1 at [[ADDR]] thread T0
-  }
-}
-
-int main(int argc, char **argv) {
-  foo(9, 21);
-  return 0;
-}

Removed: compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc?rev=367886&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/zero_page_pc.cc (removed)
@@ -1,16 +0,0 @@
-// Check that ASan correctly detects SEGV on the zero page.
-// RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s
-
-typedef void void_f();
-int main() {
-  void_f *func = (void_f *)0x4;
-  func();
-  // x86 reports the SEGV with both address=4 and pc=4.
-  // On PowerPC64 ELFv1, the pointer is taken to be a function-descriptor
-  // pointer out of which three 64-bit quantities are read. This will SEGV, but
-  // the compiler is free to choose the order. As a result, the address is
-  // either 0x4, 0xc or 0x14. The pc is still in main() because it has not
-  // actually made the call when the faulting access occurs.
-  // CHECK: {{AddressSanitizer: (SEGV|access-violation).*(address|pc) 0x0*[4c]}}
-  return 0;
-}

Modified: compiler-rt/trunk/test/lit.common.cfg.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg.py?rev=367887&r1=367886&r2=367887&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg.py (original)
+++ compiler-rt/trunk/test/lit.common.cfg.py Mon Aug  5 09:48:12 2019
@@ -254,7 +254,7 @@ if config.host_os == 'Darwin':
       config.available_features.add('osx-autointerception')
       config.available_features.add('osx-ld64-live_support')
     else:
-      # The ASAN initialization-bug.cc test should XFAIL on OS X systems
+      # The ASAN initialization-bug.cpp test should XFAIL on OS X systems
       # older than El Capitan. By marking the test as being unsupported with
       # this "feature", we can pass the test on newer OS X versions and other
       # platforms.




More information about the llvm-commits mailing list