Commit Graph

1835 Commits

Author SHA1 Message Date
Dan Albert
1bd299a58e Fix error checking in get_temp_file_name().
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
2015-02-13 03:02:28 +00:00
Marshall Clow
f2e36ef093 Move the test for zero-length into the char_traits (from string_view). Add tests to char_traits specializations
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228981 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 23:34:52 +00:00
Marshall Clow
7f59a88431 Fixed a problem that UBSAN found, where we were calling memcmp(null, p, 0) - which is undefined behavior
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228952 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 19:58:06 +00:00
Marshall Clow
451ae6e21c Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228928 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 15:25:54 +00:00
Marshall Clow
bdb73f1f8b Remove undefined behavior from test; specifically, compare(NULL, XXX, 0). Thanks to Eric for the catch
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 15:21:20 +00:00
Marshall Clow
35e462ddee Change some template parameter names from _C and _N to _Cont and _Sz. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228843 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 16:14:01 +00:00
Marshall Clow
e7d392585e Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 15:48:21 +00:00
Marshall Clow
3024f86865 Fix PR 22541: When values are equal, minmax should return the rightmost one in the initializer_list
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 15:41:34 +00:00
Eric Fiselier
a11e2cf183 Update double_include.sh.cpp for new headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228784 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 01:31:02 +00:00
Eric Fiselier
578c9e8f46 libc++ tests: wait_until.pass test sporadically fails (bug 21998)
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
2015-02-11 01:25:57 +00:00
Eric Fiselier
566739170a Make convert_to_integral.pass.cpp more platform generic.
Don't depend on the underlying types of enums and wchar_t.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228781 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 01:18:05 +00:00
Eric Fiselier
1a633ca404 Remove default definition for libcxx_obj_dir because it doesn't make sense
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11 01:03:44 +00:00
Dan Albert
f42a8e6003 Make ABI header not found a warning, not an error.
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
2015-02-10 18:46:57 +00:00
Eric Fiselier
47b9a9a286 Add pragma system header to some experimental headers and add newlines to files.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228712 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 17:32:49 +00:00
Eric Fiselier
5495e2efb9 Fix more issues exposed by -pedantic-errors in c++03 mode
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228711 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 17:20:18 +00:00
Eric Fiselier
7f9cc52faf Remove use of zero length arrays in tests. Get tests passing with -pedantic-errors
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228706 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 16:51:29 +00:00
Eric Fiselier
c3231d213a [libcxx] Fix PR 22468 - std::function<void()> does not accept non-void-returning functions
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
2015-02-10 16:48:45 +00:00
Eric Fiselier
31cb7fe75e [libcxx] Properly convert the count arguments to the *_n algorithms before use.
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
2015-02-10 16:46:42 +00:00
Eric Fiselier
f17cecb13f Fix use of C++11 extensions in C++03 code.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228698 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10 15:17:46 +00:00
Dan Albert
062d0a6dfc Add __cxxabi_config.h to libcxxabi headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228364 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 23:56:33 +00:00
Eric Fiselier
8492cd84ff Remove use of _[A-Z] identifiers and poison them to detect usage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228353 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 23:01:40 +00:00
Eric Fiselier
75fdf0ea7c Get tests running with warnings. Fix warnings in headers and tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228344 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 20:28:37 +00:00
Dimitry Andric
70e0af45ae Fix unused private field warning in stdexcept after r207695.
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
2015-02-05 07:40:48 +00:00
Dimitry Andric
e64ec52760 Test commit: remove whitespace at EOL.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228280 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 07:26:14 +00:00
Dan Albert
3727be521a Fix some -Wundef issues.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 02:34:59 +00:00
JF Bastien
aaf0b548fb libc++: remove unused variable in random_device::operator()()
Reviewers: jvoung

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7416

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228183 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 20:25:57 +00:00
Eric Fiselier
08fe42c473 add platform to LIT's available features
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 23:49:58 +00:00
Eric Fiselier
f6ed0311fb Fix alignment in tests for readability.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228028 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 21:00:15 +00:00
Greg Fitzgerald
015fb24be6 Don't assume LIT_EXECUTABLE points to a Python script, take 2
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
2015-02-03 18:47:37 +00:00
Greg Fitzgerald
4668566a60 Revert "Don't assume LIT_EXECUTABLE points to a Python script"
This reverts r227994

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227996 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 18:16:47 +00:00
Greg Fitzgerald
35f1c499e4 Don't assume LIT_EXECUTABLE points to a Python script
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
2015-02-03 18:02:04 +00:00
Eric Fiselier
40f8695e54 Mark <experimental/system_error> as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227974 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 16:04:45 +00:00
Eric Fiselier
cdc7bb55df [libcxx] Add <experimental/system_error>
Summary:
This patch just adds the variable templates in <experimental/system_error>.

see: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#syserror


Reviewers: jroelofs, danalbert, K-ballo, mclow.lists

Reviewed By: mclow.lists

Subscribers: chandlerc, cfe-commits

Differential Revision: http://reviews.llvm.org/D7353

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227973 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 16:03:24 +00:00
Jonathan Roelofs
c6893aecfd Revert: Revert r227804: Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
EricWF has updated the compilers on his buildbots. Hopefully they won't crash now.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227971 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03 15:34:17 +00:00
Eric Fiselier
57947ca867 Rename pow2 functions in __hash_table to reflect that they are hash specific
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227866 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 21:31:48 +00:00
Eric Fiselier
9e0197634f Update LFTS status page
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227862 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 21:10:21 +00:00
Eric Fiselier
665613f5be [libcxx] Add <experimental/chrono>
Summary:
This patch adds <experimental/chrono> which only contains a single variable template.

See: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#time

Reviewers: jroelofs, danalbert, K-ballo, mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7352

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227860 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 21:05:47 +00:00
Marshall Clow
a0ec4b7c85 Fix PR#22433. The algorithm is_partitioned was testing an item in the middle of the sequence twice.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 18:16:35 +00:00
Marshall Clow
4c2684ccf9 Fix PR#22427. The implementation of inplace_merge had a \'small data set\' optimization; if either half of the merge was small (i.e, less than 9 items), it did an inplace merge rather than allocating a buffer and doing a faster/smarter merge. However, this failed to satisfy the complexity requirements in the standard. Remove that code. Add tests to check the complexity, and add the same tests for std::merge, since we are in that section of the test suite anyway.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227811 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 17:35:53 +00:00
Marshall Clow
e809f4ce45 Reorder a couple of operations in inplace_merge so that we can meet the complexity guidelines mandated by the standard. References PR22427
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 16:44:11 +00:00
Jonathan Roelofs
7743dddc8c Revert r227804: Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
This change is causing a driver crash on libcxx-libcxxabi-x86_64-linux-ubuntu-msan


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 15:56:43 +00:00
Jonathan Roelofs
0c71f582b5 Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
http://reviews.llvm.org/D6626


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 15:04:29 +00:00
Dan Albert
c49fb89ff4 Add myself to CREDITS.TXT.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 22:40:31 +00:00
Dan Albert
e3eda9d453 Update web page to direct patches to Phabricator.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 22:33:41 +00:00
Marshall Clow
5e56c30413 Fix for PR22061 by K-ballo
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227384 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 22:22:35 +00:00
Marshall Clow
df00d5e5ad We had two identical files named 'MoveOnly.h' in the test suite. Move one to support/, remove the other, and update all the tests that included them. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227370 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 21:22:53 +00:00
Marshall Clow
eea9d20edb Removed some tabs that snuck into the test suite. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227363 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 20:26:11 +00:00
Marshall Clow
01c1c6fcc7 Fix PR22366. When move-constructing an associative container and explicitly passing an allocator that compares different, we were not calling the destructor of the elements in the moved-from container.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227359 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 19:54:25 +00:00
Eric Fiselier
a769d7ff49 Fix flag order of -xc++ in CXXCompiler.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227273 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 00:05:48 +00:00
Eric Fiselier
db5d6af29b Fix definition of __has_feature in r227263
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@227264 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 23:05:41 +00:00