Checking errno without first checking that the call failed means that
if some other call prior to mkstemp failed with EINVAL prior to this,
the assert would fire even if mkstemp succeeded. If something failed
with EEXIST, it would go in to an infinite loop.
Change-Id: I3f140a3e15fe08664a38a8c9a950c4ed547eb481
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229035 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Hello Howard,
While running the libc++ tests on our ARM boards, we encounter sporadic failures of the two tests:
test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
test/std/thread/futures/futures.unique_future/wait_until.pass.cpp
The worker thread might not finish yet when the main thread checks its result.
I filed the bug 21998 for this case: http://llvm.org/bugs/show_bug.cgi?id=21998
Would you be able to review this please?
Thank you.
Oleg
Reviewers: howard.hinnant, mclow.lists, danalbert, jroelofs, EricWF
Reviewed By: jroelofs, EricWF
Subscribers: EricWF, mclow.lists, aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D6750
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228783 91177308-0d34-0410-b5e6-96231b3b80d8
Since we've added a new header to libc++abi (__cxxabi_config.h), we
now have a case where we might not always find all the ABI headers:
building libc++ against the system's libc++abi on Darwin.
Since this isn't actually a fatal error, degrade it to a warning.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228720 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
The bug can be found here: http://llvm.org/bugs/show_bug.cgi?id=22468
`__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile.
Reviewers: eugenis, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7444
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228705 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
The requirement on the `Size` type passed to *_n algorithms is that it is convertible to an integral type. This means we can't use a variable of type `Size` directly. Instead we need to convert it to an integral type first. The problem is finding out what integral type to convert it to. `__convert_to_integral` figures out what integral type to convert it to and performs the conversion, It also promotes the resulting integral type so that it is at least as big as an integer. `__convert_to_integral` also has a special case for converting enums. This should only work on non-scoped enumerations because it does not apply an explicit conversion from the enum to its underlying type.
Reviewers: chandlerc, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7449
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228704 91177308-0d34-0410-b5e6-96231b3b80d8
Add a new _LIBCPP_UNUSED define in __config, which can be used to
indicate explicitly unused items, and apply it to the __imp__ field of
__libcpp_refstring.
Somebody who knows about Microsoft C++ and IBM C++ should fill in the
unused attribute syntax appropriate for those compilers, if there is
any.
Differential Revision: http://reviews.llvm.org/D6836
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228281 91177308-0d34-0410-b5e6-96231b3b80d8
Before this patch, the CMake build assumed LIT_EXECUTABLE pointed
to a Python script, not an executable. If you were to pass in an
executable, such as the result of py2exe on lit.py, the build would
fall over.
With this patch, the CMake build assumes LIT_EXECUTABLE is an
executable. You can continue setting it to lit.py, but it will
now use its shebang to find a Python interpreter.
Differential Revision: http://reviews.llvm.org/D7315
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228005 91177308-0d34-0410-b5e6-96231b3b80d8
Before this patch, the CMake build assumed LIT_EXECUTABLE pointed
to a Python script, not an executable. If you were to pass in an
executable, such as the result of py2exe on lit.py, the build would
fall over.
With this patch, the CMake build assumes LIT_EXECUTABLE is an
executable. You can continue setting it to lit.py, but it will
now use its shebang to find a Python interpreter.
Differential Revision: http://reviews.llvm.org/D7315
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227994 91177308-0d34-0410-b5e6-96231b3b80d8