diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt index b8f87c571430..6c07d1a8c6ff 100644 --- a/compiler-rt/lib/asan/tests/CMakeLists.txt +++ b/compiler-rt/lib/asan/tests/CMakeLists.txt @@ -32,7 +32,8 @@ set(ASAN_UNITTEST_COMMON_CFLAGS -O2 -Wno-format -Werror=sign-compare - -Wno-non-virtual-dtor) + -Wno-non-virtual-dtor + ) append_list_if(COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG -Wno-variadic-macros ASAN_UNITTEST_COMMON_CFLAGS) # This will ensure the target linker is used @@ -56,7 +57,8 @@ list(APPEND ASAN_UNITTEST_COMMON_CFLAGS ${COMPILER_RT_ASAN_SHADOW_SCALE_FLAG} -DASAN_HAS_BLACKLIST=1 -DASAN_HAS_EXCEPTIONS=1 - -DASAN_UAR=0) + -DASAN_UAR=0 + ) if(APPLE) list(APPEND ASAN_UNITTEST_COMMON_CFLAGS ${DARWIN_osx_CFLAGS}) @@ -132,27 +134,33 @@ set_target_properties(AsanBenchmarks PROPERTIES FOLDER "Compiler-RT Tests") set(ASAN_NOINST_TEST_SOURCES ${COMPILER_RT_GTEST_SOURCE} - asan_fake_stack_test.cc - asan_noinst_test.cc - asan_test_main.cc) + asan_fake_stack_test.cpp + asan_noinst_test.cpp + asan_test_main.cpp + ) set(ASAN_INST_TEST_SOURCES ${COMPILER_RT_GTEST_SOURCE} - asan_globals_test.cc - asan_interface_test.cc - asan_internal_interface_test.cc - asan_test.cc - asan_oob_test.cc - asan_mem_test.cc - asan_str_test.cc - asan_test_main.cc) + asan_globals_test.cpp + asan_interface_test.cpp + asan_internal_interface_test.cpp + asan_test.cpp + asan_oob_test.cpp + asan_mem_test.cpp + asan_str_test.cpp + asan_test_main.cpp + ) if(APPLE) - list(APPEND ASAN_INST_TEST_SOURCES asan_mac_test.cc asan_mac_test_helpers.mm) + list(APPEND ASAN_INST_TEST_SOURCES + asan_mac_test.cpp + asan_mac_test_helpers.mm + ) endif() set(ASAN_BENCHMARKS_SOURCES ${COMPILER_RT_GTEST_SOURCE} - asan_benchmarks_test.cc) + asan_benchmarks_test.cpp + ) function(add_asan_tests arch test_runtime) cmake_parse_arguments(TEST "" "KIND" "CFLAGS" ${ARGN}) diff --git a/compiler-rt/lib/asan/tests/asan_benchmarks_test.cc b/compiler-rt/lib/asan/tests/asan_benchmarks_test.cpp similarity index 97% rename from compiler-rt/lib/asan/tests/asan_benchmarks_test.cc rename to compiler-rt/lib/asan/tests/asan_benchmarks_test.cpp index 9a0ed72d42f7..564bc1a03007 100644 --- a/compiler-rt/lib/asan/tests/asan_benchmarks_test.cc +++ b/compiler-rt/lib/asan/tests/asan_benchmarks_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_benchmarks_test.cc ----------------------===// +//===-- asan_benchmarks_test.cpp ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_exceptions_test.cc b/compiler-rt/lib/asan/tests/asan_exceptions_test.cpp similarity index 100% rename from compiler-rt/lib/asan/tests/asan_exceptions_test.cc rename to compiler-rt/lib/asan/tests/asan_exceptions_test.cpp diff --git a/compiler-rt/lib/asan/tests/asan_fake_stack_test.cc b/compiler-rt/lib/asan/tests/asan_fake_stack_test.cpp similarity index 98% rename from compiler-rt/lib/asan/tests/asan_fake_stack_test.cc rename to compiler-rt/lib/asan/tests/asan_fake_stack_test.cpp index 13beea8f2585..504b0aaf3014 100644 --- a/compiler-rt/lib/asan/tests/asan_fake_stack_test.cc +++ b/compiler-rt/lib/asan/tests/asan_fake_stack_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_fake_stack_test.cc -------------------------------------------===// +//===-- asan_fake_stack_test.cpp ------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_globals_test.cc b/compiler-rt/lib/asan/tests/asan_globals_test.cpp similarity index 94% rename from compiler-rt/lib/asan/tests/asan_globals_test.cc rename to compiler-rt/lib/asan/tests/asan_globals_test.cpp index b852b6b5e469..660a14a3110a 100644 --- a/compiler-rt/lib/asan/tests/asan_globals_test.cc +++ b/compiler-rt/lib/asan/tests/asan_globals_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_globals_test.cc ----------------------------------------------===// +//===-- asan_globals_test.cpp ---------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_interface_test.cc b/compiler-rt/lib/asan/tests/asan_interface_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_interface_test.cc rename to compiler-rt/lib/asan/tests/asan_interface_test.cpp index 8cbe469bf9b3..a93d9ec3075c 100644 --- a/compiler-rt/lib/asan/tests/asan_interface_test.cc +++ b/compiler-rt/lib/asan/tests/asan_interface_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_interface_test.cc --------------------------------------------===// +//===-- asan_interface_test.cpp -------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_internal_interface_test.cc b/compiler-rt/lib/asan/tests/asan_internal_interface_test.cpp similarity index 95% rename from compiler-rt/lib/asan/tests/asan_internal_interface_test.cc rename to compiler-rt/lib/asan/tests/asan_internal_interface_test.cpp index 2d3b9c1f55d7..218edaffb62a 100644 --- a/compiler-rt/lib/asan/tests/asan_internal_interface_test.cc +++ b/compiler-rt/lib/asan/tests/asan_internal_interface_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_internal_interface_test.cc -----------------------------------===// +//===-- asan_internal_interface_test.cpp ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_mac_test.cc b/compiler-rt/lib/asan/tests/asan_mac_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_mac_test.cc rename to compiler-rt/lib/asan/tests/asan_mac_test.cpp index 14e105252e45..bd36089991de 100644 --- a/compiler-rt/lib/asan/tests/asan_mac_test.cc +++ b/compiler-rt/lib/asan/tests/asan_mac_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_test_mac.cc --------------------------------------------------===// +//===-- asan_test_mac.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_mem_test.cc b/compiler-rt/lib/asan/tests/asan_mem_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_mem_test.cc rename to compiler-rt/lib/asan/tests/asan_mem_test.cpp index 1339c1271bdd..5007d552bfff 100644 --- a/compiler-rt/lib/asan/tests/asan_mem_test.cc +++ b/compiler-rt/lib/asan/tests/asan_mem_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_mem_test.cc --------------------------------------------------===// +//===-- asan_mem_test.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_noinst_test.cc b/compiler-rt/lib/asan/tests/asan_noinst_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_noinst_test.cc rename to compiler-rt/lib/asan/tests/asan_noinst_test.cpp index 8460abf97db1..2f6b11bb6cb6 100644 --- a/compiler-rt/lib/asan/tests/asan_noinst_test.cc +++ b/compiler-rt/lib/asan/tests/asan_noinst_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_noinst_test.cc -----------------------------------------------===// +//===-- asan_noinst_test.cpp ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_oob_test.cc b/compiler-rt/lib/asan/tests/asan_oob_test.cpp similarity index 98% rename from compiler-rt/lib/asan/tests/asan_oob_test.cc rename to compiler-rt/lib/asan/tests/asan_oob_test.cpp index f023ca24b995..1f0640957f71 100644 --- a/compiler-rt/lib/asan/tests/asan_oob_test.cc +++ b/compiler-rt/lib/asan/tests/asan_oob_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_oob_test.cc --------------------------------------------------===// +//===-- asan_oob_test.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_racy_double_free_test.cc b/compiler-rt/lib/asan/tests/asan_racy_double_free_test.cpp similarity index 100% rename from compiler-rt/lib/asan/tests/asan_racy_double_free_test.cc rename to compiler-rt/lib/asan/tests/asan_racy_double_free_test.cpp diff --git a/compiler-rt/lib/asan/tests/asan_str_test.cc b/compiler-rt/lib/asan/tests/asan_str_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_str_test.cc rename to compiler-rt/lib/asan/tests/asan_str_test.cpp index 8ed451408dc4..cc5bd2b4446e 100644 --- a/compiler-rt/lib/asan/tests/asan_str_test.cc +++ b/compiler-rt/lib/asan/tests/asan_str_test.cpp @@ -1,4 +1,4 @@ -//=-- asan_str_test.cc ----------------------------------------------------===// +//=-- asan_str_test.cpp ---------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_test.cc b/compiler-rt/lib/asan/tests/asan_test.cpp similarity index 99% rename from compiler-rt/lib/asan/tests/asan_test.cc rename to compiler-rt/lib/asan/tests/asan_test.cpp index 2795b71cd0d0..1318727c8c57 100644 --- a/compiler-rt/lib/asan/tests/asan_test.cc +++ b/compiler-rt/lib/asan/tests/asan_test.cpp @@ -1,4 +1,4 @@ -//===-- asan_test.cc ------------------------------------------------------===// +//===-- asan_test.cpp -----------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/asan/tests/asan_test_main.cc b/compiler-rt/lib/asan/tests/asan_test_main.cpp similarity index 97% rename from compiler-rt/lib/asan/tests/asan_test_main.cc rename to compiler-rt/lib/asan/tests/asan_test_main.cpp index 1f94ec287e60..245d07f87b51 100644 --- a/compiler-rt/lib/asan/tests/asan_test_main.cc +++ b/compiler-rt/lib/asan/tests/asan_test_main.cpp @@ -1,4 +1,4 @@ -//===-- asan_test_main.cc -------------------------------------------------===// +//===-- asan_test_main.cpp ------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh b/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh index ffce7fdc937f..db3758ee5297 100755 --- a/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh +++ b/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh @@ -83,7 +83,7 @@ run_lint ${ASAN_RTL_LINT_FILTER} ${INTERCEPTION}/*.cpp \ ASAN_RTL=${COMPILER_RT}/lib/asan run_lint ${ASAN_RTL_LINT_FILTER} ${ASAN_RTL}/*.cpp \ ${ASAN_RTL}/*.h & -run_lint ${ASAN_TEST_LINT_FILTER} ${ASAN_RTL}/tests/*.cc \ +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 &