| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC.
The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well.
Note there are still 2 outstanding exception_ptr/nested_exception test failures.
* `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time.
* `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion.
This patch also gets most of the `<future>` tests passing as well.
Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT
Subscribers: mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D32927
llvm-svn: 302393
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libc++ doesn't provide its own definitions of new/delete on Windows,
instead using the versions provided by VCRuntime. However VCRuntime
does not yet implement aligned new/delete so these tests fail.
It might be possible for libc++ to provide its own definitions only
for aligned new/delete as long as MSVC doesn't provide it. However
before this can be done libc++ needs to figure out how to implement
std::get_new_handler.
llvm-svn: 302384
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes test failures that occur on Windows because
the tests attempt to generate two distinct temp file names but
get the same name both time.
The fix for this is to create the first temp file before requesting
a second temporary file name. This ensures that the second name
will be unique.
llvm-svn: 302382
|
|
|
|
| |
llvm-svn: 302381
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In https://bugs.freebsd.org/207918, Daniel McRobb describes how using
std::showbase with ostreams can cause truncation of unsigned long long
when output format is octal. In fact, this can even happen with
unsigned int and unsigned long.
To ensure this does not happen, add one additional character to the
do_put buffers if std::showbase is on. Also add a test case.
Reviewers: EricWF, mclow.lists
Reviewed By: EricWF
Subscribers: cfe-commits, emaste
Differential Revision: https://reviews.llvm.org/D32670
llvm-svn: 302362
|
|
|
|
|
|
|
|
| |
fine-grained manner.
Fixes D32926.
llvm-svn: 302325
|
|
|
|
|
|
|
|
|
|
| |
with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value.
Fixes D32924.
llvm-svn: 302322
|
|
|
|
|
|
|
|
|
|
|
| |
shouldn't be mandated".
In C++17, these iterators are allowed but not required
to inherit from the deprecated std::iterator base class.
Fixes D32727.
llvm-svn: 302318
|
|
|
|
| |
llvm-svn: 302298
|
|
|
|
| |
llvm-svn: 302213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For std::isinf, the standard requires effectively calling isinf as
double from Libc for integral types. But integral types are never
infinite; we don't need to call Libc to return false.
Also short-circuit other functions where Libc won't have interesting
answers: signbit, fpclassify, isfinite, isnan, and isnormal.
I added correctness tests for integral types since we're no longer
deferring to Libc.
In review it was pointed out that in future revisions of the C++
standard we may add more types to std::is_arithmetic (e.g.,
std::is_fixed_point). I'll leave it to a future commit to hack this to
allow using math functions on those. We'll need to change things like
__libcpp_fpclassify anyway, so I'm not sure anything here would really
be future-proof.
https://reviews.llvm.org/D31561
rdar://problem/31361223
llvm-svn: 301060
|
|
|
|
|
|
|
|
|
|
| |
* 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: 300942
|
|
|
|
| |
llvm-svn: 300937
|
|
|
|
| |
llvm-svn: 300652
|
|
|
|
| |
llvm-svn: 300635
|
|
|
|
| |
llvm-svn: 300633
|
|
|
|
| |
llvm-svn: 300632
|
|
|
|
| |
llvm-svn: 300627
|
|
|
|
| |
llvm-svn: 300626
|
|
|
|
| |
llvm-svn: 300625
|
|
|
|
| |
llvm-svn: 300623
|
|
|
|
| |
llvm-svn: 300622
|
|
|
|
|
|
|
|
| |
std::unordered_multimap
This completes the cleanup of the containers, at least within the tests.
llvm-svn: 300620
|
|
|
|
|
|
| |
std::unordered_multiset
llvm-svn: 300619
|
|
|
|
| |
llvm-svn: 300604
|
|
|
|
| |
llvm-svn: 300602
|
|
|
|
| |
llvm-svn: 300600
|
|
|
|
| |
llvm-svn: 300595
|
|
|
|
| |
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: 300451
|
|
|
|
|
|
| |
extra tests
llvm-svn: 300449
|
|
|
|
| |
llvm-svn: 300417
|
|
|
|
| |
llvm-svn: 300415
|
|
|
|
| |
llvm-svn: 300414
|
|
|
|
| |
llvm-svn: 300413
|
|
|
|
| |
llvm-svn: 300412
|
|
|
|
| |
llvm-svn: 300411
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch cleans up all usages of the following feature test macros inside
<vector> and its tests:
* _LIBCPP_HAS_NO_RVALUE_REFERENCES
* _LIBCPP_HAS_NO_VARIADICS
* _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
Where needed the above guards were replaced with _LIBCPP_CXX03_LANG.
llvm-svn: 300410
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 300397
|