[libcxx-commits] [libcxx] 8fb4745 - [libc++/abi] Fix broken Lit feature no-noexcept-function-type
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 15 11:42:32 PDT 2021
Author: Louis Dionne
Date: 2021-07-15T14:42:07-04:00
New Revision: 8fb47456a356c5bfe0046a9d1c74cb048a4624bf
URL: https://github.com/llvm/llvm-project/commit/8fb47456a356c5bfe0046a9d1c74cb048a4624bf
DIFF: https://github.com/llvm/llvm-project/commit/8fb47456a356c5bfe0046a9d1c74cb048a4624bf.diff
LOG: [libc++/abi] Fix broken Lit feature no-noexcept-function-type
The feature was always defined, which means that the two test cases
guarded by it were never run.
Differential Revision: https://reviews.llvm.org/D106062
Added:
Modified:
libcxx/utils/libcxx/test/features.py
libcxxabi/test/catch_function_03.pass.cpp
libcxxabi/test/catch_member_function_pointer_02.pass.cpp
libcxxabi/test/libcxxabi/test/config.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 43c9e4abf1cd3..77ba85e4611c5 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -42,6 +42,7 @@
Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
+ Feature(name='no-noexcept-function-type', when=lambda cfg: featureTestMacros(cfg).get('__cpp_noexcept_function_type', 0) < 201510),
Feature(name='non-lockfree-atomics',
when=lambda cfg: sourceBuilds(cfg, """
diff --git a/libcxxabi/test/catch_function_03.pass.cpp b/libcxxabi/test/catch_function_03.pass.cpp
index b321ecf6ed6f8..d8b2dd8fe67c0 100644
--- a/libcxxabi/test/catch_function_03.pass.cpp
+++ b/libcxxabi/test/catch_function_03.pass.cpp
@@ -7,7 +7,10 @@
//===----------------------------------------------------------------------===//
// Can a noexcept function pointer be caught by a non-noexcept catch clause?
-// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type
+// UNSUPPORTED: no-exceptions, no-noexcept-function-type
+
+// Support for catching a function pointer including noexcept was shipped in macOS 10.13
+// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}
#include <cassert>
diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
index f92035b4ff8f9..d658f26793c10 100644
--- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
+++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp
@@ -6,9 +6,11 @@
//
//===----------------------------------------------------------------------===//
-// Can a noexcept member function pointer be caught by a non-noexcept catch
-// clause?
-// UNSUPPORTED: no-exceptions, libcxxabi-no-noexcept-function-type
+// Can a noexcept member function pointer be caught by a non-noexcept catch clause?
+// UNSUPPORTED: no-exceptions, no-noexcept-function-type
+
+// Support for catching a function pointer including noexcept was shipped in macOS 10.13
+// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}
// GCC 7 and 8 support noexcept function types but this test still fails.
// This is likely a bug in their implementation. Investigation needed.
diff --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py
index c59d203968b58..f44892be06f4b 100644
--- a/libcxxabi/test/libcxxabi/test/config.py
+++ b/libcxxabi/test/libcxxabi/test/config.py
@@ -37,13 +37,8 @@ def configure_obj_root(self):
self.libcxxabi_obj_root = self.get_lit_conf('libcxxabi_obj_root')
super(Configuration, self).configure_obj_root()
- def has_cpp_feature(self, feature, required_value):
- return intMacroValue(self.cxx.dumpMacros().get('__cpp_' + feature, '0')) >= required_value
-
def configure_features(self):
super(Configuration, self).configure_features()
- if not self.has_cpp_feature('noexcept_function_type', 201510):
- self.config.available_features.add('libcxxabi-no-noexcept-function-type')
if not self.get_lit_bool('llvm_unwinder', False):
self.config.available_features.add('libcxxabi-has-system-unwinder')
More information about the libcxx-commits
mailing list