From e42f32507a3b2998b47c84b24575a1301da39ec2 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 3 Apr 2019 10:07:37 +0000 Subject: [PATCH] Revert "[libc++] Correctly handle Objective-C++ ARC qualifiers in std::is_pointer" This broke the Chromium build on Mac, see https://crbug.com/949071 > Summary: > Otherwise, std::is_pointer works, but std::is_pointer > (and others) don't work as expected. > > rdar://problem/49126333 > > Reviewers: ahatanak, EricWF > > Subscribers: christof, jkorous, dexonsmith, libcxx-commits > > Differential Revision: https://reviews.llvm.org/D60087 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@357569 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/type_traits | 5 -- .../type_traits/is_pointer_objc.arc.pass.mm | 56 ------------------- 2 files changed, 61 deletions(-) delete mode 100644 test/libcxx/type_traits/is_pointer_objc.arc.pass.mm diff --git a/include/type_traits b/include/type_traits index a42299f91..2b7949094 100644 --- a/include/type_traits +++ b/include/type_traits @@ -784,11 +784,6 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v template struct __libcpp_is_pointer : public false_type {}; template struct __libcpp_is_pointer<_Tp*> : public true_type {}; -#if defined(_LIBCPP_HAS_OBJC_ARC) -template struct __libcpp_is_pointer<_Tp* __weak> : public true_type {}; -template struct __libcpp_is_pointer<_Tp* __autoreleasing> : public true_type {}; -template struct __libcpp_is_pointer<_Tp* __unsafe_unretained> : public true_type {}; -#endif template struct _LIBCPP_TEMPLATE_VIS is_pointer : public __libcpp_is_pointer::type> {}; diff --git a/test/libcxx/type_traits/is_pointer_objc.arc.pass.mm b/test/libcxx/type_traits/is_pointer_objc.arc.pass.mm deleted file mode 100644 index 8f0e52bfb..000000000 --- a/test/libcxx/type_traits/is_pointer_objc.arc.pass.mm +++ /dev/null @@ -1,56 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// UNSUPPORTED: c++98, c++03 - -// - -// std::is_pointer - -// Test that we correctly handle Objective-C++ ARC qualifiers on pointers. - -#include - - -template -void test() { - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); - static_assert(std::is_pointer::value, ""); -} - -@class Foo; - -int main(int, char**) { - test(); - test(); - test(); - test(); - test(); - test(); - test(); - test(); - - return 0; -}