summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx] Use newest supported language dialect when running the test suite.Eric Fiselier2015-10-031-1/+14
| | | | | | | | | | | | | | | Summary: Currently the test suite defaults to C++11 mode if no standard version is supplied to LIT using `--param=std=c++XX`. This patch changes that behavior so that the newest possible dialect is selected instead. I have already patched the C++11 bot to explicitly specify `--param=std=c++11`. I'm just putting this up for review to see if anybody objects to this idea. Reviewers: mclow.lists, jroelofs, danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13331 llvm-svn: 249226
* [libcxx] Attempt to fix __throw_future_error in C++03 Eric Fiselier2015-10-021-31/+30
| | | | | | | | | | | | | | | | | | Summary: Hi Marshall, Could you please test this patch and see if you run into the same linker errors we talked about? I can't reproduce on linux or OS X. Hopefully you can't find any problems and we can fix the C++03 bot. Reviewers: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13337 llvm-svn: 249192
* Attempt to prevent flaky thread.mutex tests by once again increasing timing ↵Eric Fiselier2015-10-0113-28/+37
| | | | | | tolerances llvm-svn: 248993
* Manually suppress -Wnonnull when it occurs in an unevaluated contextEric Fiselier2015-10-012-0/+12
| | | | llvm-svn: 248989
* Fix initialzation order in dynarrayEric Fiselier2015-10-011-1/+1
| | | | llvm-svn: 248988
* Suppress array initialization warnings in std::experimental::apply testsEric Fiselier2015-10-0119-18/+62
| | | | llvm-svn: 248987
* Dont link -lrt in the testsuite on linux unless using sanitizers.Eric Fiselier2015-10-011-2/+4
| | | | llvm-svn: 248986
* Fix Typo in GCC no RTTI detection. Fixes PR#24901. Thanks to Bernhard ↵Marshall Clow2015-09-221-1/+1
| | | | | | Rosenkraenzer for the report and the patch. llvm-svn: 248329
* Add placeholder __libcpp_relaxed_store() for when atomic builtins are not ↵Dimitry Andric2015-09-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | available. Summary: In rL241532, atomic_support.h was added, which provides handling of atomic operations for libc++. When atomic builtins are not available, it emits a warning about being unsupported, but it still provides a number of stubs for the required functions. However, it misses a stub for `__libcpp_relaxed_store()`. Add it, by using the same implementation as for `__libcpp_atomic_store()`. (Note that I encountered this on arm-freebsd, which still defaults to armv4, and does not have the runtime libcalls to support atomic builtins. For now, I have simply disabled using them.) Reviewers: mclow.lists, EricWF Subscribers: theraven, cfe-commits, jroelofs, majnemer, aemerson Differential Revision: http://reviews.llvm.org/D13051 llvm-svn: 248313
* Remove possible trailing padding from aligned_storage. Patch from Yiran WangEric Fiselier2015-09-221-2/+2
| | | | llvm-svn: 248309
* The test I cnecked in to check the fix for PR#24890 failed (as expected) w/o ↵Marshall Clow2015-09-221-0/+1
| | | | | | the fix, but for the wrong reason. Now it fails for the right reason. llvm-svn: 248307
* Check in the test for PR#24890 that I forgot in previous commitMarshall Clow2015-09-221-0/+18
| | | | llvm-svn: 248305
* Change pair::swap(pair&) to call ADL swap instead of iter_swap; this fixes ↵Marshall Clow2015-09-221-2/+3
| | | | | | an obscure bug having to do with overloaded operator&. Fixes PR#24890 llvm-svn: 248304
* Fix <atomic> with -pedantic-errorsEric Fiselier2015-09-221-1/+1
| | | | llvm-svn: 248240
* Add endianness configuration block for GCC.Dan Albert2015-09-161-0/+10
| | | | | | | Previously GCC using libc++ would just leak endian.h for every include. llvm-svn: 247827
* Suppress some warnings in the tests that snuck in. That 'tmpnam' is ↵Marshall Clow2015-09-152-1/+2
| | | | | | deprecated doesn't change the fact that we have to test it. llvm-svn: 247704
* Change initialization of mbstate_t objects in tests from '= {0}' to '= {}', ↵Marshall Clow2015-09-1519-21/+21
| | | | | | which does the same thing, w/o having clang and gcc warn with -Wall. llvm-svn: 247695
* Implementation of Boyer-Moore and Boyer-Moore-Horspool searchers for the LFTS.Marshall Clow2015-09-0811-4/+1360
| | | | llvm-svn: 247036
* make common_type SFINAE-friendly and support void. Patch from Agustin Berge.Eric Fiselier2015-09-082-24/+95
| | | | | | | This patch also fixes PR22135. (https://llvm.org/bugs/show_bug.cgi?id=22135) See the review for more information: http://reviews.llvm.org/D6964 llvm-svn: 246977
* Cleanup BuildingLibcxx.rst and remove TODOEric Fiselier2015-09-061-3/+3
| | | | llvm-svn: 246952
* Fix another bad link in the new docsEric Fiselier2015-09-061-2/+2
| | | | llvm-svn: 246951
* Try to fix links for libcxx.llvm.org/docs again.Eric Fiselier2015-09-061-27/+15
| | | | llvm-svn: 246950
* Try and fix links again. Seems to be a sphinx version issue.Eric Fiselier2015-09-051-12/+12
| | | | llvm-svn: 246915
* Try and fix broken bugzilla linkEric Fiselier2015-09-051-1/+1
| | | | llvm-svn: 246914
* Cleanup new documentation index and transfer more information from ↵Eric Fiselier2015-09-051-37/+53
| | | | | | www/index.html llvm-svn: 246913
* Remove test commit.Tanya Lattner2015-09-051-1/+1
| | | | llvm-svn: 246912
* Test temporary commit. Tanya Lattner2015-09-051-1/+1
| | | | llvm-svn: 246911
* Test commit for builderEric Fiselier2015-09-052-0/+4
| | | | llvm-svn: 246910
* Add temporary Makefile.sphinx build file to get libcxx.llvm.org/docs goingEric Fiselier2015-09-051-0/+34
| | | | llvm-svn: 246909
* Try building docs again.Eric Fiselier2015-09-051-1/+0
| | | | llvm-svn: 246906
* Test commit for sphinx docs try2Eric Fiselier2015-09-041-0/+1
| | | | llvm-svn: 246895
* Test commit to see if libcxx.llvm.org/docs buildsEric Fiselier2015-09-041-1/+1
| | | | llvm-svn: 246893
* Make a helper routine __throw_future_error, and encapsulate the #ifdef ↵Marshall Clow2015-09-031-72/+43
| | | | | | _LIBCPP_NO_EXCEPTIONS there, instead of duplicating it throughout the code. No functionality change llvm-svn: 246772
* Remove unused code. NFCMarshall Clow2015-08-311-12/+0
| | | | llvm-svn: 246445
* Move __lazy_* metafunctions to type traits and add testsEric Fiselier2015-08-314-26/+200
| | | | llvm-svn: 246408
* Suppress clang warnings in some testsEric Fiselier2015-08-309-28/+55
| | | | llvm-svn: 246399
* Remove task to get C++03 tests passing from TODO.txtEric Fiselier2015-08-302-2/+1
| | | | llvm-svn: 246392
* Fix most GCC warnings during build. Only -Wattribute left.Eric Fiselier2015-08-282-4/+5
| | | | llvm-svn: 246280
* Finally get the test suite passing in C++03!!Eric Fiselier2015-08-284-3/+12
| | | | | | | | | After months of work there are only 4 tests still failing in C++03. This patch fixes those tests. All of the libc++ builders should be green. llvm-svn: 246275
* Remove empty file that arcanist createdEric Fiselier2015-08-281-0/+0
| | | | llvm-svn: 246273
* [libcxx] Constrain unique_ptr::operator=(unique_ptr<Tp, Dp>) in C++03 modeEric Fiselier2015-08-281-2/+9
| | | | | | | | | | | | | | | | | Summary: This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type. The following two tests begin passing in C++03: * `unique_ptr.single.asgn/move_convert.pass.cpp` * `unique_ptr.single.asgn/move_convert13.fail.cpp` Reviewers: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12173 llvm-svn: 246272
* [libcxx] Mark most test/std/future tests as UNSUPPORTED in C++03Eric Fiselier2015-08-2839-603/+356
| | | | | | | | | | | | | | | | | | | | Summary: This patch marks *most* tests for `std::promise`, `std::future` and `std::shared_future` as unsupported in C++03. These tests fail in C++03 mode because they attempt to copy a `std::future` even though it is a `MoveOnly` type. AFAIK the missing move-semantics in `std::future` is the only reason these tests fail but without move semantics these classes are useless. For example even though `std::promise::set_value` and `std::promise::set_exception(...)` work in C++03 `std::promise` is still useless because we cannot call `std::promise::get_future(...)`. It might be possible to hack `std::move(...)` like we do for `std::unique_ptr` to make the move semantics work but I don't think it is worth the effort. Instead I think we should leave the `<future>` header as-is and mark the failing tests as `UNSUPPORTED`. I don't believe there are any users of `std::future` or `std::promise` in C++03 because they are so unusable. Therefore I am not concerned about losing test coverage and possibly breaking users. However because there are still parts of `<future>` that work in C++03 it would be wrong to `#ifdef` out the entire header. @mclow.lists Should we take further steps to prevent the use of `std::promise`, `std::future` and `std::shared_future` in C++03? Note: This patch also cleans up the tests and converts them to use `support/test_allocator.h` instead of a duplicate class in `test/std/futures/test_allocator.h`. Reviewers: mclow.lists Subscribers: vsk, mclow.lists, cfe-commits Differential Revision: http://reviews.llvm.org/D12135 llvm-svn: 246271
* Fix bug in test_allocator<void> that used the wrong value to represent ↵Eric Fiselier2015-08-281-2/+2
| | | | | | object state llvm-svn: 246270
* [libcxx] Optimize away unneeded length calculation in ↵Eric Fiselier2015-08-281-2/+10
| | | | | | | | | | | | | | | | basic_string::compare(const char*) Summary: This patch optimizes basic_string::compare to use strcmp when the default char_traits has been given. See PR19900 for more information. https://llvm.org/bugs/show_bug.cgi?id=19900 Reviewers: mclow.lists Subscribers: bkramer, cfe-commits Differential Revision: http://reviews.llvm.org/D12355 llvm-svn: 246266
* Do not include pthread.h and sched.h when threads are disabledJonathan Roelofs2015-08-272-0/+4
| | | | | | | | Patch by Philippe Daouadi! http://reviews.llvm.org/D9639 llvm-svn: 246168
* Remove a switch statement, and replace with a bunch of ifs to silence a ↵Marshall Clow2015-08-271-11/+2
| | | | | | warning about 'all the enumeration values covered'. No functional change. llvm-svn: 246150
* [libcxx] Remove installation rules on Darwin when it would overwrite the ↵Eric Fiselier2015-08-263-15/+38
| | | | | | | | | | | | | | | | | system installation. Summary: On Mac OS X overwriting `/usr/lib/libc++.dylib` can cause your computer to fail to boot. This patch tries to make it harder to do that accidentally. If `CMAKE_SYSTEM_NAME` is `Darwin` and `CMAKE_INSTALL_PREFIX` is `/usr` don't generate installation rules unless the user explicitly provides `LIBCXX_OVERRIDE_DARWIN_INSTALL=ON`. Note that `CMAKE_INSTALL_PREFIX` is always absolute so we don't need to worry about things like `/usr/../usr`. Reviewers: mclow.lists, beanz, jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12209 llvm-svn: 246070
* [libcxx] Add special warning flag detection logic to compiler.pyEric Fiselier2015-08-262-6/+30
| | | | | | | | | | | | Summary: Detecting `-Wno-<warning>` flags can be tricky with GCC (See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html). This patch adds a special `addWarningFlagIfSupported(<flag>)` method to the test compiler object that can be used to add warning flags. The goal of this patch is to help get the test suite running with more warnings. Reviewers: danalbert, jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11333 llvm-svn: 246069
* [libcxx] Rewrite C++03 __invoke.Eric Fiselier2015-08-265-415/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch rewrites the C++03 `__invoke` and related meta-programming. There are a number of major changes. `__invoke` in C++03 now has a fallback overload for when the invoke expression is ill-formed (similar to C++11). This means that the `__invoke_return` traits will return `__nat` when `__invoke(...)` is ill formed. This would previously cause a compile error. Bullets 1-4 of `__invoke` have been rewritten. In the old version `__invoke` had 32 overloads for bullets 1 and 2, one for each possible cv-qualified function signature with arities 0-3. 64 overloads would be needed to support member functions with varargs. Currently these overloads were fundamentally broken. An example overload looked like: ``` template <class Rp, class Tp, class T1, class A0> Rp __invoke(Rp (Tp::*pm)(A0) const, T1&, A0&) ``` Because `A0` appeared in two different deducible contexts it would have to deduce to be an exact match or the overload would be rejected. This is made even worse because `A0` appears without a reference qualifier in the member function signature and with a reference qualifier as an `__invoke` parameter. This means that only member functions that took all of their arguments by value could be matched. One possible fix would be to make the second occurrence of `A0` appear in a non-deducible context. This way any type convertible to `A0` could be passed as the first parameter. The benefit of this approach is that the signature of the member function enforces the arity and types taken by the `__invoke` signature it generates. However nothing in the `INVOKE` specification requires this behavior. My solution is to use a `__invoke_enable_if<PM_Type, Tp>` metafunction to selectively enable the `__invoke` overloads for bullets 1, 2, 3 and 4. It uses `__member_function_traits` to inspect and extract the return type and class type of the pointer to member. Using `__member_function_traits` to inspect `PM_Type` also allows us to reduce the number of `__invoke` overloads from 32 to 8 and add varargs support at the same time. Because `__invoke_enable_if` knows the exact return type of `__invoke` for bullets 1-4 we no longer need to use `decltype(__invoke(...))` to compute the return type in the `__invoke_return*` traits. This will reduce the problems caused by `#define decltype(X) __typeof__(X)` in C++03. Tests for this change have already been committed. All tests in `test/std/utilities/function.objects` now pass in C++03, previously there were 20 failures. Reviewers: K-ballo, howard.hinnant, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11553 llvm-svn: 246068
* Refactor flaky shared_mutex testsEric Fiselier2015-08-264-22/+39
| | | | llvm-svn: 246055
OpenPOWER on IntegriCloud