From 882ce178b317c565f14b0de05a2c9ee39fe78a83 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 14 Oct 2021 15:37:04 -0700 Subject: [PATCH] [NFC][sanitizer] Remove %stdcxx11 -std=c++14 is a default for a while. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D111848 --- compiler-rt/test/asan/TestCases/exitcode.cpp | 2 +- .../test/asan/TestCases/use-after-scope-capture.cpp | 2 +- compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp | 4 +--- compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp | 3 +-- compiler-rt/test/asan/TestCases/use-after-scope-types.cpp | 2 +- compiler-rt/test/asan/lit.cfg.py | 8 -------- compiler-rt/test/memprof/lit.cfg.py | 3 --- 7 files changed, 5 insertions(+), 19 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/exitcode.cpp b/compiler-rt/test/asan/TestCases/exitcode.cpp index cb10540999b7..e949436e1909 100644 --- a/compiler-rt/test/asan/TestCases/exitcode.cpp +++ b/compiler-rt/test/asan/TestCases/exitcode.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan -g %stdcxx11 -Wno-deprecated-declarations %s -o %t +// RUN: %clangxx_asan -g -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. diff --git a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp index 319d20519e7c..19444b80d935 100644 --- a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp +++ b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \ +// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp index 2cfc7cee215a..2a2981caf938 100644 --- a/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp +++ b/compiler-rt/test/asan/TestCases/use-after-scope-temp.cpp @@ -1,6 +1,4 @@ -// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \ -// RUN: not %run %t 2>&1 | FileCheck %s - +// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && not %run %t 2>&1 | FileCheck %s struct IntHolder { int val; diff --git a/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp index 3e6f52a3942e..48688ebbcca7 100644 --- a/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp +++ b/compiler-rt/test/asan/TestCases/use-after-scope-temp2.cpp @@ -1,7 +1,6 @@ -// RUN: %clangxx_asan %stdcxx11 -O1 -fsanitize-address-use-after-scope %s -o %t && \ +// RUN: %clangxx_asan -O1 -fsanitize-address-use-after-scope %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s - struct IntHolder { __attribute__((noinline)) const IntHolder &Self() const { return *this; diff --git a/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp index 5afd3b1ef4e0..dd077e9a3511 100644 --- a/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp +++ b/compiler-rt/test/asan/TestCases/use-after-scope-types.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx_asan %stdcxx11 -O0 -fsanitize-address-use-after-scope %s -o %t +// RUN: %clangxx_asan -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 diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py index cfd2407909e7..497c5e5f0706 100644 --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -167,14 +167,6 @@ if platform.system() == 'Windows': config.substitutions.append( ("%asan_cxx_lib", base_lib % "_cxx") ) config.substitutions.append( ("%asan_dll_thunk", base_lib % "_dll_thunk") ) -if platform.system() == 'Windows': - # Don't use -std=c++11 on Windows, as the driver will detect the appropriate - # default needed to use with the STL. - config.substitutions.append(("%stdcxx11 ", "")) -else: - # Some tests uses C++11 features such as lambdas and need to pass -std=c++11. - config.substitutions.append(("%stdcxx11 ", "-std=c++11 ")) - # FIXME: De-hardcode this path. asan_source_dir = os.path.join( get_required_attr(config, "compiler_rt_src_root"), "lib", "asan") diff --git a/compiler-rt/test/memprof/lit.cfg.py b/compiler-rt/test/memprof/lit.cfg.py index 79024b64d46a..a247d42d792b 100644 --- a/compiler-rt/test/memprof/lit.cfg.py +++ b/compiler-rt/test/memprof/lit.cfg.py @@ -74,9 +74,6 @@ if config.memprof_dynamic: config.substitutions.append( ("%clang_memprof_static ", build_invocation(clang_memprof_static_cflags)) ) config.substitutions.append( ("%clangxx_memprof_static ", build_invocation(clang_memprof_static_cxxflags)) ) -# Some tests uses C++11 features such as lambdas and need to pass -std=c++11. -config.substitutions.append(("%stdcxx11 ", '-std=c++11 ')) - config.substitutions.append( ("%libdl", libdl_flag) ) config.available_features.add('memprof-' + config.bits + '-bits')