[libcxx-commits] [libcxxabi] 7876992 - [libc++abi] Add -Wno-unreachable-code when building test for throwing incomplete types
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 1 12:29:53 PDT 2020
Author: Louis Dionne
Date: 2020-05-01T15:29:40-04:00
New Revision: 78769923fe03b6d8dfcd3dad69b6f3eff5a2f813
URL: https://github.com/llvm/llvm-project/commit/78769923fe03b6d8dfcd3dad69b6f3eff5a2f813
DIFF: https://github.com/llvm/llvm-project/commit/78769923fe03b6d8dfcd3dad69b6f3eff5a2f813.diff
LOG: [libc++abi] Add -Wno-unreachable-code when building test for throwing incomplete types
Slightly older Clangs seem to think they are more clever than they really
are, and they think the code can never be executed. The code can actually
be executed in case the exception runtime is mis-implemented, which is
exactly what this test is testing. This commit just disables the spurious
warning.
Added:
Modified:
libcxxabi/test/incomplete_type.sh.cpp
Removed:
################################################################################
diff --git a/libcxxabi/test/incomplete_type.sh.cpp b/libcxxabi/test/incomplete_type.sh.cpp
index 999c172dd5b5..20deb16011f0 100644
--- a/libcxxabi/test/incomplete_type.sh.cpp
+++ b/libcxxabi/test/incomplete_type.sh.cpp
@@ -20,8 +20,8 @@
// for shell tests because of Apple security features).
// FILE_DEPENDENCIES: %t.exe
-// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.one.o
-// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.two.o -DTU_ONE
+// RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o %t.one.o
+// RUN: %{cxx} %{flags} %{compile_flags} -Wno-unreachable-code -c %s -o %t.two.o -DTU_ONE
// RUN: %{cxx} %{flags} %t.one.o %t.two.o %{link_libcxxabi} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe
More information about the libcxx-commits
mailing list