| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 245336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ensure all of thread-local destructors are called.
Summary:
See https://llvm.org/bugs/show_bug.cgi?id=22606 for more discussion.
Most of the changes in this patch are file reorganization to help ensure assumptions about how __thread_specific_pointer is used hold. The assumptions are:
* `__thread_specific_ptr<Tp>` is only created with a `__thread_struct` pointer.
* `__thread_specific_ptr<Tp>` can only be constructed inside the `__thread_local_data()` function.
I'll remove the comments before committing. They are there for clarity during review.
Reviewers: earthdok, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8802
llvm-svn: 245334
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Normally people won't see warnings in libc++ headers, but if they compile with "-Wsystem-headers -Wnon-virtual-dtor" they will likely see issues in <locale>.
In the libc++ implementation `time_get' has a private base class, `__time_get_c_storage`, with virtual methods but a non-virtual destructor.
`time_get` itself can safely be used as a polymorphic base class because it inherits a virtual destructor from `locale::facet`. To placate the compiler we change `__time_get_c_storage`'s destructor from public to protected, ensuring that it will never be deleted polymorphically.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11670
llvm-svn: 245333
|
|
|
|
|
|
| |
Specifically add new noexcept stuff to vector and string's move-assignment operations
llvm-svn: 245330
|
|
|
|
|
|
| |
has decreed 'no exceptions'. This matches the behavior of string and vector
llvm-svn: 245239
|
|
|
|
| |
llvm-svn: 244717
|
|
|
|
| |
llvm-svn: 244462
|
|
|
|
| |
llvm-svn: 244047
|
|
|
|
| |
llvm-svn: 244003
|
|
|
|
|
|
| |
Fixes PR#24342
llvm-svn: 243937
|
|
|
|
|
|
| |
compiler-rt breakages.
llvm-svn: 243784
|
|
|
|
| |
llvm-svn: 243737
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 243729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 243725
|
|
|
|
|
|
|
| |
This patch adds the working parts of r243503. The difference with this patch
is that it doesn't include the HandleLLVMOptions.cmake file.
llvm-svn: 243698
|
|
|
|
|
|
| |
that might give wrong answers on a 1's complement machine.
llvm-svn: 243674
|
|
|
|
| |
llvm-svn: 243641
|
|
|
|
| |
llvm-svn: 243593
|
|
|
|
|
|
| |
r243574
llvm-svn: 243591
|
|
|
|
| |
llvm-svn: 243586
|
|
|
|
|
|
|
|
|
| |
This change was reverted in r243550 because it broke clang-format builds
(see PR24306).
This patch recommits a fixed version of the original.
llvm-svn: 243574
|
|
|
|
|
|
| |
This caused clang-format to stop linking on Mac; see PR24306.
llvm-svn: 243550
|
|
|
|
|
|
| |
and the suggested fix.
llvm-svn: 243530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch contains the following changes:
1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does.
2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros.
The goals for this patch are:
1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671).
2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option.
3. Make libc++'s CMakeLists.txt file easier to understand and change.
4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs).
5. Move towards allowing libc++ to use other LLVM utilities such as `not` and `FileCheck`.
Reviewers: mclow.lists, jroelofs, danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11308
llvm-svn: 243503
|
|
|
|
| |
llvm-svn: 243499
|
|
|
|
|
|
| |
single template function. NFC
llvm-svn: 243415
|
|
|
|
| |
llvm-svn: 243393
|
|
|
|
| |
llvm-svn: 243392
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The key changes in this patch are:
1. Remove the zero-argument overload in mem_fn. A member function must always
be invoked with at least one argument, the class instance. The zero-argument
operator()() in mem_fn would cause mem_fn to fail to compile when because
the call to '__invoke(pm)' is not well formed.
2. Prevent evaluation of '__apply_cv<Tp, Ret>' when 'Ret' is a function type.
'Ret' is a function type whenever 'Ret Tp::*' is a pointer to member function.
Attempting to add cv and ref qualifiers to a function type can cause a hard
compile error.
3. Remove the dummy overload __invoke(Rp Tp::*). It was present to help work
around #1. It will be replaced with a different '__invoke' overload that
represents a bad call to invoke.
After applying this patch the test func.wrap.func.inv/invoke.pass.cpp now
passes.
llvm-svn: 243370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does a couple of things to get __invoke working for free-functions
and call objects.
1. Turn all uses of declval<Tp>() into declval<Tp&>(). The C++03 __invoke only
supports lvalues but it will be used when the compiler supports rvalue
references but not variadic templates. This change makes sure we don't
generate an rvalue.
2. Call objects for bullet 5 are now passed by reference and not value. Copying
the functor is incorrect. It will fail to compile for non-copyable functors
and it will discard cv-qualifiers on the call object, possibly leading to the
wrong function being called. I suspect that the reason the call object
was originally taken by value was to support temporary call objects.
However __invoke is only used internally and it is never given a temporary.
llvm-svn: 243368
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation of mem_fn doesn't actually require any C++11 support.
For some reason there were 17 overloads for mem_fn in C++03 when only one
is needed. This patch removes the extra overloads and uses the same implementation
of mem_fn in C++03 and C++11.
__mem_fn does require variadics to implement the call operator. Instead of
having two entirely different implementations of the __mem_fn struct, this patch
uses the same __mem_fn struct but provides different call operators when
variadics are not available.
The only thing left in <__functional_03> is the C++03 implementation of
std::function.
llvm-svn: 242959
|
|
|
|
|
|
|
|
|
| |
This patch removes a large amount of duplicate code found in both
<__functional_base> and <__functional_base_03>. The only code that remains
in <__functional_base_03> is the C++03 implementation of __invoke and
__invoke_return.
llvm-svn: 242951
|
|
|
|
| |
llvm-svn: 242872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<__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: 242864
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch adds special configuration logic to find the compiler_rt libraries required by sanitizers on OS X. The supported sanitizers are Address and Undefined.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11381
llvm-svn: 242858
|
|
|
|
| |
llvm-svn: 242788
|
|
|
|
| |
llvm-svn: 242695
|
|
|
|
| |
llvm-svn: 242682
|
|
|
|
|
|
| |
yet; those are coming soon.
llvm-svn: 242679
|
|
|
|
| |
llvm-svn: 242634
|
|
|
|
| |
llvm-svn: 242633
|
|
|
|
| |
llvm-svn: 242632
|