| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
Clang 5.0 implements these changes here: https://github.com/llvm-mirror/clang/commit/87cd035326a39523eeb1b295ad36cff337141ef9
MSVC++ will implement these changes in the first toolset update to 2017.
Differential Revision: https://reviews.llvm.org/D33021
llvm-svn: 302710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
base break shared_ptr
Summary:
This patch fixes bugs.llvm.org/PR32979.
[util.smartptr.shared.const] says:
> In the constructor definitions below, enables shared_from_this with p, for a pointer p of type Y*, means
> that if Y has an unambiguous and accessible base class that is a specialization of enable_shared_from_-
> this.
This means that libc++ needs to respect the access specifier of the base class, and not attempt to construct
and enabled_shared_from_this base if it is private. However access specifiers don't affect overload resolution
so our current implementation will attempt to construct the private base.
This patch uses SFINAE to correctly detect if the shared_ptr input has an accessible enable_shared_from_this
base class.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D33033
llvm-svn: 302709
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Windows the function template `template <class T> void test()` has
the same mangled name when instantiated with the distinct types `void()`
and `void() noexcept`. When this occurs Clang emits an error. This error
was causing two type-traits tests to fail.
However this can be worked around by using class templates instead of
function templates, which is what this patch does to fix the errors.
llvm-svn: 302380
|
|
|
|
|
|
|
|
| |
fine-grained manner.
Fixes D32926.
llvm-svn: 302325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libc++ is used as a system library on macOS and iOS (amongst others). In order
for users to be able to compile a binary that is intended to be deployed to an
older version of the platform, clang provides the
availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_
that can be placed on declarations to describe the lifecycle of a symbol in the
library.
See docs/DesignDocs/AvailabilityMarkup.rst for more information.
Differential Revision: https://reviews.llvm.org/D31739
llvm-svn: 302172
|
|
|
|
|
|
|
| |
* Add a new macro _MSVC_STL_VER to detect when the MSVC STL is being tested
* Workaround C1XX __is_trivially_copyable bug
llvm-svn: 302158
|
|
|
|
| |
llvm-svn: 302105
|
|
|
|
|
|
|
|
|
|
| |
* Cover optional's emplace-from-initializer_list overload
* Verify that any::emplace and optional::emplace return a reference to the correct type even for throwing cases.
Differential Revision: https://reviews.llvm.org/D32106
llvm-svn: 301055
|
|
|
|
| |
llvm-svn: 300635
|
|
|
|
| |
llvm-svn: 300581
|
|
|
|
| |
llvm-svn: 300575
|
|
|
|
|
|
|
|
|
|
| |
unique_ptr hash functions.
These tests were unconditionally asserting that optional and unique_ptr declare throwing hashes, but MSVC++ implements conditional noexcept forwarding that of the underlying hash function. As a result we were failing these tests but there's nothing forbidding strengthening noexcept in that way.
Changed the ASSERT_NOT_NOEXCEPT asserts to use types which themselves have non-noexcept hash functions.
llvm-svn: 300516
|
|
|
|
| |
llvm-svn: 300489
|
|
|
|
|
|
| |
(comment-only change)
llvm-svn: 300488
|
|
|
|
| |
llvm-svn: 300411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch overhauls both specializations of unique_ptr while implementing
the following LWG issues:
* LWG 2801 - This issue constrains unique_ptr's constructors when the deleter type
is not default constructible. Additionally it adds SFINAE conditions
to unique_ptr<T[]>::unique_ptr(Up).
* LWG 2905 - This issue reworks the unique_ptr(pointer, /* see below */ deleter)
constructors so that they correctly SFINAE when the deleter argument cannot
be used to construct the stored deleter.
* LWG 2520 - This issue fixes initializing unique_ptr<T[]> from nullptr.
Libc++ had previously implemented this issue, but the suggested resolution
still broke initialization from NULL. This patch re-works the
unique_ptr<T[]>(Up, deleter) overloads so that they accept NULL as well
as nullptr.
llvm-svn: 300406
|
|
|
|
|
|
|
| |
Also mark LWG 2857 as complete, since the changes to optional and
any were completed by Marshall earlier.
llvm-svn: 300403
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch almost entirely rewrites the unique_ptr tests. There are a couple
of reasons for this:
A) Most of the *.fail.cpp tests were either incorrect or could be better written
as a *.pass.cpp test that uses <type_traits> to check if certain operations
are valid (Ex. Using static_assert(!std::is_copy_constructible_v<T>) instead
of writing a failure test).
B) [unique.ptr.runtime] has very poor test coverage. Many of the constructors
and assignment operators have to tests at all. The special members that have
tests have very few test cases and are typically way out of date.
C) The tests for [unique.ptr.single] and [unique.ptr.runtime] are largely
duplicates of each other. This means common requirements have two different
sets of tests in two different test files. This makes the tests harder to
maintain than if there was a single copy.
To address (A) this patch changes almost all of the *.fail.cpp tests into
.pass.cpp tests using type traits; Allowing the *.fail.cpp tests to be removed.
The address (B) and (C) the tests for [unique.ptr.single] and [unique.ptr.runtime]
have been combined into a single directory, allowing both specializations to share
common tests. Tests specific to the single/runtime specializations are given the
suffix "*.single.pass.cpp" or "*.runtime.pass.cpp".
Finally the unique.ptr test have been moved into the correct directory according
to the standard. Specifically they have been removed from "utilities/memory" into
"utilities/smartptr".
PS. This patch also adds newly written tests for upcoming unique_ptr changes/fixes.
However since these tests don't currently pass they are guarded by the macro
TEST_WORKAROUND_UPCOMING_UNIQUE_PTR_CHANGES. This allows other STL's to validate
the tests before libc++ implements the changes. The relevant libc++ changes should
land in the next week.
llvm-svn: 300388
|
|
|
|
| |
llvm-svn: 300175
|
|
|
|
| |
llvm-svn: 300165
|
|
|
|
| |
llvm-svn: 300159
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::unique_ptr's default constructor must be constexpr in order
to allow constant initialization to take place for static objects;
Even though we can never have a constexpr unique_ptr variable since
it's not a literal type.
This patch adds tests that constant initialization takes place by
using the __attribute__((require_constant_initialization)) macro.
llvm-svn: 300158
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
times, and add constexpr.
Summary:
__compressed_pair takes and passes it's constructor arguments by value. This causes arguments to be moved 3 times instead of once. This patch addresses that issue and fixes `constexpr` on the constructors.
I would rather have this fix than D27564, and I'm fairly confident it's not ABI breaking but I'm not 100% sure.
I prefer this solution because it removes a lot of code and makes the implementation *much* smaller.
Reviewers: mclow.lists, K-ballo
Reviewed By: K-ballo
Subscribers: K-ballo, cfe-commits
Differential Revision: https://reviews.llvm.org/D27565
llvm-svn: 300140
|
|
|
|
| |
llvm-svn: 300132
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements http://cplusplus.github.io/LWG/lwg-defects.html#2911.
I'm putting this up for review until __is_aggregate is added to clang (See D31513)
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31515
llvm-svn: 300126
|
|
|
|
| |
llvm-svn: 300124
|
|
|
|
|
|
| |
as https://reviews.llvm.org/D31956
llvm-svn: 300123
|
|
|
|
|
|
|
|
|
|
|
| |
For reference deleter types the const qualifier on the return type
of get_deleter() should be ignored, and a non-const deleter should
be returned.
This patch fixes a bug where "const deleter_type&" is incorrectly
formed.
llvm-svn: 300121
|
|
|
|
|
|
|
|
|
|
| |
is_constructible.pass.cpp.
This happens when using Clang with MSVC's STL, so there are no actual uses of this variable.
Fixes D31966.
llvm-svn: 300079
|
|
|
|
| |
llvm-svn: 300009
|
|
|
|
|
|
| |
This issue missed a couple, so I added those as well (see LWG#2942)
llvm-svn: 299963
|
|
|
|
| |
llvm-svn: 299909
|
|
|
|
| |
llvm-svn: 299907
|
|
|
|
| |
llvm-svn: 299901
|
|
|
|
| |
llvm-svn: 299894
|
|
|
|
|
|
|
|
| |
optional and unique_ptr hash functions."
This reverts commit r299734.
llvm-svn: 299744
|
|
|
|
|
|
| |
important for hash tests.
llvm-svn: 299735
|
|
|
|
|
|
|
|
|
|
| |
unique_ptr hash functions.
These tests were unconditionally asserting that optional and unique_ptr declare throwing hashes, but MSVC++ implements conditional noexcept forwarding that of the underlying hash function. As a result we were failing these tests but there's nothing forbidding strengthening noexcept in that way.
Changed the ASSERT_NOT_NOEXCEPT asserts to use types which themselves have non-noexcept hash functions.
llvm-svn: 299734
|
|
|
|
| |
llvm-svn: 299411
|
|
|
|
| |
llvm-svn: 299105
|
|
|
|
| |
llvm-svn: 299100
|
|
|
|
|
|
| |
change
llvm-svn: 298582
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
Reviewers: EricWF
Reviewed By: EricWF
Differential Revision: https://reviews.llvm.org/D31273
llvm-svn: 298581
|
|
|
|
|
|
| |
C++17
llvm-svn: 298580
|
|
|
|
|
|
| |
functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234
llvm-svn: 298573
|
|
|
|
| |
llvm-svn: 298422
|
|
|
|
| |
llvm-svn: 298418
|
|
|
|
|
|
| |
the return type of the unary +/- operators for std::chrono::duration, though I expect that no one will notice.
llvm-svn: 298416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests for libc++ specify -target on the command-line to the
compiler, but this is problematic for a few reasons.
Firstly, the -target option isn't supported on Apple platforms. Parts
of the triple get dropped and ignored. Instead, software should be
compiled with a combination of the -arch and -m<name>-version-min
options.
Secondly, the generic "darwin" target references a kernel version
instead of a platform version. Each platform has its own independent
versions (with different versions of libc++.1.dylib), independent of the
version of the Darwin kernel.
This commit adds support to the LIT infrastructure for testing against
Apple platforms using -arch and -platform options.
If the host is not on OS X, or the compiler type is not clang or apple-clang, then this commit has NFC.
If the host is on OS X and --param=target_triple=... is specified, then a warning is emitted to use arch and platform instead. Besides the warning, there's NFC.
If the host is on OS X and *no* target-triple is specified, then use the new deployment target logic. This uses two new lit parameters, --param=arch=<arch> and --param=platform=<platform>. <platform> has the form <name>[<version>].
By default, arch is auto-detected from clang -dumpmachine, and platform is "macosx".
If the platform doesn't have a version:
For "macosx", the version is auto-detected from the host system using sw_vers. This may give a different version than the SDK, since new SDKs can be installed on older hosts.
Otherwise, the version is auto-detected from the SDK version using xcrun --show-sdk-path.
-arch <arch> -m<name>-version-min=<version> is added to the compiler flags.
The target triple is computed as <arch>-apple-<platform>. It is *not* passed to clang, but it is available for XFAIL and UNSUPPORTED (as is with_system_cxx_lib=<target>).
For convenience, apple-darwin and <arch>-apple-darwin are added to the set of available features.
There were a number of tests marked to XFAIL on x86_64-apple-darwin11
and x86_64-apple-darwin12. I updated these to
x86_64-apple-macosx10.7 and x86_64-apple-macosx10.8.
llvm-svn: 297798
|
|
|
|
|
|
| |
tools" algorithms.
llvm-svn: 297772
|