mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Revert r372777: [libc++] Implement LWG 2510 and its follow-ups
This also reverts: - r372778: [libc++] Implement LWG 3158 - r372782: [libc++] Try fixing tests that fail on GCC 5 and older - r372787: Purge mentions of GCC 4 from the test suite Reason: the change breaks compilation of LLVM with libc++, for details see http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@372832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
// (except clang-3.6 which temporarily enabled sized-deallocation)
|
||||
// UNSUPPORTED: clang, apple-clang
|
||||
|
||||
// NOTE: GCC 4.9.1 does not support sized-deallocation in C++14. However
|
||||
// GCC 5.1 does.
|
||||
// XFAIL: gcc-4.7, gcc-4.8, gcc-4.9
|
||||
|
||||
#include <new>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
@@ -15,6 +15,10 @@
|
||||
// (except clang-3.6 which temporarily enabled sized-deallocation)
|
||||
// UNSUPPORTED: clang, apple-clang
|
||||
|
||||
// NOTE: GCC 4.9.1 does not support sized-deallocation in C++14. However
|
||||
// GCC 5.1 does.
|
||||
// XFAIL: gcc-4.7, gcc-4.8, gcc-4.9
|
||||
|
||||
#include <new>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
@@ -1,30 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// Before GCC 6, aggregate initialization kicks in.
|
||||
// See https://stackoverflow.com/q/41799015/627587.
|
||||
// UNSUPPORTED: gcc-5
|
||||
|
||||
// struct nothrow_t {
|
||||
// explicit nothrow_t() = default;
|
||||
// };
|
||||
// extern const nothrow_t nothrow;
|
||||
|
||||
// This test checks for LWG 2510.
|
||||
|
||||
#include <new>
|
||||
|
||||
|
||||
std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}}
|
||||
|
||||
int main(int, char**) {
|
||||
return 0;
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is dual licensed under the MIT and the University of Illinois Open
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// struct nothrow_t {
|
||||
// explicit nothrow_t() = default;
|
||||
// };
|
||||
// extern const nothrow_t nothrow;
|
||||
|
||||
#include <new>
|
||||
|
||||
|
||||
int main(int, char**) {
|
||||
std::nothrow_t x = std::nothrow;
|
||||
(void)x;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user