| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
__rebind_pointer.
Currently we need an #ifdef branch every time we use pointer traits to rebind a pointer because
it is done differently in C++11 and C++03. This patch introduces the __rebind_pointer utility to
clean this up.
Also add a test that list and it's iterators can be instantiated with incomplete element types.
llvm-svn: 245806
|
| |
|
|
|
|
|
| |
First I removed all of the uses of _LIBCPP_STD_VER and added LIT UNSUPPORTED tags to prevent the tests from being run in older standard dialects.
Second I increased the time tolerances used in some tests when testing with Thread Sanitizer because thread sanitizer make these tests take longer.
llvm-svn: 245793
|
| |
|
|
| |
llvm-svn: 245538
|
| |
|
|
| |
llvm-svn: 245529
|
| |
|
|
| |
llvm-svn: 245513
|
| |
|
|
| |
llvm-svn: 245512
|
| |
|
|
|
|
|
| |
Because <atomic> can now be used in C++03 there is no need for the test_atomic.h header.
This commit removes the header and converts all usages to use <atomic> instead.
llvm-svn: 245468
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
After putting this question up on cfe-dev I have decided that it would be best to allow the use of `<atomic>` in C++03. Although static initialization is a concern the syntax required to get it is C++11 only. Meaning that C++11 constant static initialization cannot silently break in C++03, it will always cause a syntax error. Furthermore `ATOMIC_VAR_INIT` and `ATOMIC_FLAG_INIT` remain defined in C++03 even though they cannot be used because C++03 usages will cause better error messages.
The main change in this patch is to replace `__has_feature(cxx_atomic)`, which only returns true when C++ >= 11, to `__has_extension(c_atomic)` which returns true whenever clang supports the required atomic builtins.
This patch adds the following macros:
* `_LIBCPP_HAS_C_ATOMIC_IMP` - Defined on clang versions which provide the C `_Atomic` keyword.
* `_LIBCPP_HAS_GCC_ATOMIC_IMP` - Defined on GCC > 4.7. We must use the fallback atomic implementation.
* `_LIBCPP_HAS_NO_ATOMIC_HEADER` - Defined when it is not safe to include `<atomic>`.
`_LIBCPP_HAS_C_ATOMIC_IMP` and `_LIBCPP_HAS_GCC_ATOMIC_IMP` are mutually exclusive, only one should be defined. If neither is defined then `<atomic>` is not implemented and including `<atomic>` will issue an error.
Reviewers: chandlerc, jroelofs, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11555
llvm-svn: 245463
|
| |
|
|
| |
llvm-svn: 245415
|
| |
|
|
|
|
|
| |
std::packaged_task requires variadic templates and is #ifdef out in C++03.
This patch silences the tests in C++03. This patch also rewrites the .fail.cpp tests so that they use clang verify.
llvm-svn: 245413
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch attempts to fix the last 3 TSAN failures on the libc++ bot (http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-tsan/builds/143). This patch also adds a `Atomic` test type that can be used where `<atomic>` cannot.
`wait.exception.pass.cpp` and `wait_for.exception.pass.cpp` were failing because the test replaced `std::terminate` with `std::exit`. `std::exit` would asynchronously run the TLS and static destructors and this would cause a race condition. See PR22606 and D8802 for more details.
This is fixed by using `_Exit` to prevent cleanup.
`notify_all_at_thread_exit.pass.cpp` exercises the same race condition but for different reasons. I fixed this test by manually joining the thread before beginning program termination.
Reviewers: EricWF, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11046
llvm-svn: 245389
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
varargs function.
Summary:
This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases.
1. `__not_null(Tp const&)`: Default case. Tp is not null.
2. `__not_null(Tp* __ptr);` Case for pointers to functions.
3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members.
4. `__not_null(function<Tp> const&);`: Cases for other std::functions.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11111
llvm-svn: 245335
|
| |
|
|
|
|
| |
Specifically add new noexcept stuff to vector and string's move-assignment operations
llvm-svn: 245330
|
| |
|
|
|
|
|
|
| |
When I was refactoring the unique_ptr.single.ctor tests I added a test
deleter, 'NCDeleter', to deleter.h. Other tests that include deleter.h
redefine the NCDeleter type causing test failures.
llvm-svn: 243733
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the last sections of tests that still fail in C++03 are the unique_ptr
tests. This patch begins cleaning up the tests and fixing C++03 failures.
The main changes of this patch:
- The "Deleter" type in "deleter.h" tried to be "move-only" in C++03. However
the move simulation no longer works (see "__rv"). "Deleter" is now copy
constructible in C++03. However copying "Deleter" will "move" the test value
instead of copying it.
- Reduce the unique.ptr.single.ctor tests files from ~25 to 4. There is no
reason the tests were split through so many files.
llvm-svn: 243730
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds the second revision of <experimental/any>.
I've been working from the LFTS draft found at this link. https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#any
Reviewers: danalbert, jroelofs, K-ballo, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6762
llvm-svn: 243728
|
| |
|
|
| |
llvm-svn: 243641
|
| |
|
|
|
|
| |
and the suggested fix.
llvm-svn: 243530
|
| |
|
|
| |
llvm-svn: 243499
|
| |
|
|
| |
llvm-svn: 243393
|
| |
|
|
| |
llvm-svn: 243392
|
| |
|
|
|
|
|
| |
Before I start trying to fix __invoke in C++03 it needs better test coverage.
This patch adds a large amount of tests for __invoke.
llvm-svn: 243366
|
| |
|
|
|
|
| |
before. Thanks to Trevor Smigiel for the report
llvm-svn: 243030
|
| |
|
|
| |
llvm-svn: 242967
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<__functional_03> provides the C++03 definitions for std::memfun and
std::function. However the interaction between <functional> and <__functional_03>
is ugly and duplicates code needlessly. This patch cleans up how the two
headers work together.
The major changes are:
- Provide placeholders, is_bind_expression and is_placeholder in <functional>
for both C++03 and C++11.
- Provide bad_function_call, function fwd decl,
__maybe_derive_from_unary_function and __maybe_derive_from_binary_function
in <functional> for both C++03 and C++11.
- Move the <__functional_03> include to the bottom of <functional>. This makes
it easier to see how <__functional_03> interacts with <functional>
- Remove a commented out implementation of bind in C++03. It's never going
to get implemented.
- Mark almost all std::bind tests as unsupported in C++03. std::is_placeholder
works in C++03 and C++11. std::is_bind_expression is provided in C++03 but
always returns false.
llvm-svn: 242870
|
| |
|
|
| |
llvm-svn: 242695
|
| |
|
|
| |
llvm-svn: 242682
|
| |
|
|
|
|
| |
yet; those are coming soon.
llvm-svn: 242679
|
| |
|
|
| |
llvm-svn: 242634
|
| |
|
|
| |
llvm-svn: 242633
|
| |
|
|
| |
llvm-svn: 242632
|
| |
|
|
| |
llvm-svn: 242630
|
| |
|
|
| |
llvm-svn: 242629
|
| |
|
|
| |
llvm-svn: 242627
|
| |
|
|
| |
llvm-svn: 242626
|
| |
|
|
| |
llvm-svn: 242625
|
| |
|
|
| |
llvm-svn: 242624
|
| |
|
|
|
|
| |
never failed on clang or gcc, but MSVC whined. Patch by Andrew Parker.
llvm-svn: 242618
|
| |
|
|
|
|
| |
This patch was reviewed as D10859. http://reviews.llvm.org/D10859
llvm-svn: 242617
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch adds proper guards to the is_destructible tests depending on the standard version so that they pass in c++03.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10047
llvm-svn: 242612
|
| |
|
|
| |
llvm-svn: 242581
|
| |
|
|
|
|
| |
makes the tests work on VS. Thanks to STL for the report
llvm-svn: 242454
|
| |
|
|
|
|
| |
rather than value-initializing them. Fixes PR#24137
llvm-svn: 242377
|
| |
|
|
| |
llvm-svn: 242375
|
| |
|
|
| |
llvm-svn: 242197
|
| |
|
|
| |
llvm-svn: 242195
|
| |
|
|
|
|
| |
Add _LIBCPP_CONSTEXPR to the implementation of __gcc_atomic_t.
llvm-svn: 242172
|
| |
|
|
|
|
| |
noexcept in C++1z
llvm-svn: 242148
|
| |
|
|
|
|
| |
This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates.
llvm-svn: 242056
|
| |
|
|
|
|
|
| |
Implemented LWG2420 bits for bind<void>
Review: http://reviews.llvm.org/D10997
llvm-svn: 241967
|