summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* Allow declaration of map and multimap iterator with incomplete mapped type. ↵Eric Fiselier2015-03-034-35/+91
| | | | | | Patch from eugenis llvm-svn: 231119
* Add better tests for ctype<char>::classic_tableMarshall Clow2015-03-031-0/+36
| | | | llvm-svn: 231077
* [libcxx] Add support for linking libc++ against a static ABI library.Eric Fiselier2015-03-034-6/+35
| | | | | | | | | | | | | | | | Summary: This patch add the CMake option `LIBCXX_ENABLE_STATIC_ABI_LIBRARY` which, when enabled, will link libc++ against the static version of the ABI library. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Subscribers: compnerd, cfe-commits Differential Revision: http://reviews.llvm.org/D8017 llvm-svn: 231076
* cmath: account for MSVCRT 12.0 changesSaleem Abdulrasool2015-02-282-3/+13
| | | | | | | | | | | | | | MSVCRT 12.0 introduces better compatibility for C99. This includes a number of math routines that were previously undefined. Use the crtversion.h header to detect the version of MSVCRT being targeted and avoid re-declaring the variables. Since copysign has been introduced in MSVCRT, importing the definition via using makes it difficult to provide overloads (due to minor differences between throw () and noexcept. Avoid defining the overloads on newer MSVCRT targets. llvm-svn: 230867
* Add self to CREDITS.txtJonathan Roelofs2015-02-261-0/+4
| | | | llvm-svn: 230595
* Add remote testing support to the lit config.Jonathan Roelofs2015-02-266-21/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Executors can be specified at configure time by using the -DLIBCXX_EXECUTOR="" option. Examples include: $ cmake <other_flags> -DLIBCXX_EXECUTOR="TimeoutExecutor(30,LocalExecutor())" This runs individual tests with a maximum duration $ cmake <other_flags> -DLIBCXX_EXECUTOR="SSHExecutor('hostname','username')" This runs tests on a remote target, using scp to shuttle binaries to the target, and ssh to invoke commands there. $ cmake <other_flags> -DLIBCXX_EXECUTOR="PrefixExecutor('/path/to/run/script',LocalExecutor())" This assumes the script knows how to copy run the executables passed to it, and allows for the ultimate control. This is useful for running things inside emulators like Valgrind & QEMU. TODO: This doesn't claim to support ShTest tests yet, that will take a bit more thought & finagling (I'm still not sure how to orchestrate copy-in for those cases. I've also punted on what to do about tests that read data files. The testsuite has several tests that need to read *.dat files placed next to them, and currently those aren't copied over when using, say, an SSHExecutor. The affected tests are: libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp libc++ :: std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/member_swap.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/move_assign.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.assign/nonmember_swap.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/move.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.members/close.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_pointer.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.members/open_string.pass.cpp libc++ :: std/input.output/file.streams/fstreams/ifstream.members/rdbuf.pass.cpp libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp libc++ :: std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp Note: One thing to watch out for when using the SSHExecutor for cross-testing is that you'll also want to specify a TargetInfo object (so that the host's features aren't used for available-features checks and flags setup). http://reviews.llvm.org/D7380 llvm-svn: 230592
* libc++: support newlib's ctypeJF Bastien2015-02-252-7/+23
| | | | | | | | | | | | Summary: Newlib supports ctype differently from other platforms, this patch teaches libc++ about yet another platform that does ctype differently. Reviewers: jroelofs Subscribers: cfe-commits, danalbert, EricWF, jvoung, jfb, mclow.lists Differential Revision: http://reviews.llvm.org/D7888 llvm-svn: 230557
* Add trailing return types (and noexcept specifications) to the 'diamond ↵Marshall Clow2015-02-252-19/+57
| | | | | | operators'. Fixes PR#22600. llvm-svn: 230484
* Make the forward declaration for array swap have the same inline/visibility ↵Marshall Clow2015-02-241-0/+1
| | | | | | attributes as the definition. Thanks to Steven Wu for the catch. llvm-svn: 230330
* Remove XFAIL on string view test for apples clang compiler. Thanks to ↵Eric Fiselier2015-02-241-1/+1
| | | | | | Marshall for the fix llvm-svn: 230322
* Reword ELAST warningJF Bastien2015-02-241-1/+1
| | | | | | | | | | | | | | | | Summary: GCC emits a pretty amusing warning when there are apostrophes in a #warning: ```warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]``` Reword the warning to avoid this, and be more consistent with other warnings in libc++. Reviewers: danalbert Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7818 llvm-svn: 230298
* Change string_view::at to make it work with gcc and VC++. Thanks to K-ballo ↵Marshall Clow2015-02-231-4/+1
| | | | | | for the bug report, and Jonathan Wakeley for the code review in the bar. llvm-svn: 230260
* [libc++] Try and prevent evaluation of `is_default_constructible` on tuples ↵Eric Fiselier2015-02-213-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default constructor if it is not needed. Summary: Currently parts of the SFINAE on tuples default constructor always gets evaluated even when the default constructor is never called or instantiated. This can cause a hard compile error when a tuple is created with types that do not have a default constructor. Below is a self contained example using a pair like class. This code will not compile but probably should. ``` #include <type_traits> template <class T> struct IllFormedDefaultImp { IllFormedDefaultImp(T x) : value(x) {} constexpr IllFormedDefaultImp() {} T value; }; typedef IllFormedDefaultImp<int &> IllFormedDefault; template <class T, class U> struct pair { template <bool Dummy = true, class = typename std::enable_if< std::is_default_constructible<T>::value && std::is_default_constructible<U>::value && Dummy>::type > constexpr pair() : first(), second() {} pair(T const & t, U const & u) : first(t), second(u) {} T first; U second; }; int main() { int x = 1; IllFormedDefault v(x); pair<IllFormedDefault, IllFormedDefault> p(v, v); } ``` One way to fix this is to use `Dummy` in a more involved way in the constructor SFINAE. The following patch fixes these sorts of hard compile errors for tuple. Reviewers: mclow.lists, rsmith, K-ballo, EricWF Reviewed By: EricWF Subscribers: ldionne, cfe-commits Differential Revision: http://reviews.llvm.org/D7569 llvm-svn: 230120
* [libcxx] Move to using libc++abi2.exp as the default symbol list for libc++Eric Fiselier2015-02-213-1/+9
| | | | | | | | | | | | | | | | | | | | Summary: libc++abi2.exp should be used whenever `cxxabi.h` defines `_LIBCPPABI_VERSION`. This macro was added to libc++abi in 2012 in r149632. For this reason we should use libc++abi2.exp as default unless otherwise specified. Also when building against an in-tree libc++abi we definitely want to use libc++abi2.exp. I would love to know what OSX was the last to use libc++abi.exp but I can only test on 10.9. Reviewers: danalbert, mclow.lists, EricWF Reviewed By: EricWF Subscribers: meadori, cfe-commits Differential Revision: http://reviews.llvm.org/D7773 llvm-svn: 230119
* Add self to CREDITS.TXTLarisse Voufo2015-02-201-0/+3
| | | | llvm-svn: 229969
* More on adding sized deallocation functions in libc++: Continuing from ↵Larisse Voufo2015-02-2010-10/+750
| | | | | | r229281, this adds version guards and test cases. llvm-svn: 229968
* Fix incorrect locale mapping in config.py on OSXEric Fiselier2015-02-191-1/+1
| | | | llvm-svn: 229935
* Move to using -fdiagnostics-color=always on both GCC and ClangEric Fiselier2015-02-191-9/+1
| | | | llvm-svn: 229927
* Make basic_streambuf::xsputn write characters in chunks whenever possible, ↵Marshall Clow2015-02-191-5/+16
| | | | | | instead of one at a time. References PR#10193 llvm-svn: 229866
* Mark more tuple tests as unsupported in C++98 && C++03Eric Fiselier2015-02-192-0/+4
| | | | llvm-svn: 229810
* [libcxx] Mark most tuple tests UNSUPPORTED for c++03 and c++98.Eric Fiselier2015-02-1952-12/+103
| | | | | | | | | | | | | | Summary: No declaration for the type `tuple` is given in c++03 or c++98 modes. Mark all tests that use the actual `tuple` type as UNSUPPORTED. Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5956 llvm-svn: 229808
* Remove several unused forward declarations. Fixes PR22605.Marshall Clow2015-02-183-13/+1
| | | | llvm-svn: 229728
* Move the default template arguments into the forward declarations for the ↵Marshall Clow2015-02-182-4/+4
| | | | | | container adapters: stack and queue. References PR#22605. llvm-svn: 229708
* [libcxx] Tired of colorless compile errors? Enable color diagnostics today!Eric Fiselier2015-02-182-0/+30
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a lit option to enable color diagnostics when either `--param=color_diagnostics` is passed to LIT or `LIBCXX_COLOR_DIAGNOSTICS` is present in the environment. My only concern with this patch is that GCC and Clang take different flags and that only GCC 4.9 and greater support `-fdiagnostics-color=always` Does anybody have objections to this going in? Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7729 llvm-svn: 229707
* Move the default template arguments into the forward declarations for the ↵Marshall Clow2015-02-183-5/+6
| | | | | | containers: deque, forwardlist and list. References PR#22605. llvm-svn: 229705
* Enable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.Eric Fiselier2015-02-183-2/+21
| | | | llvm-svn: 229698
* [libc++] Fix PR20084 - std::is_function<void() const> failed.Eric Fiselier2015-02-182-15/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces some black magic to detect const and volatile qualified function types such as `void () const`. The patch works in the following way: We first rule out any type that satisfies on of the following. These restrictions are important so that the test below works properly. * `is_class<_Tp>::value` * `is_union<_Tp>::value` * `is_void<_Tp>::value` * `is_reference<_Tp>::value` * `__is_nullptr_t<_Tp>::value` If none of the above is true we perform overload resolution on `__source<_Tp>(0)` to determine the return type. * If `_Tp&` is well-formed we select `_Tp& __source(int)`. `_Tp&` is only ill formed for cv void types and cv/ref qualified function types. * Otherwise we select `__dummy_type __source(...)`. Since we know `_Tp` cannot be void then it must be a function type. let `R` be the returned from `__source<_Tp>(0)`. We perform overload resolution on `__test<_Tp>(R)`. * If `R` is `__dummy_type` we call `true_type __test(__dummy_type)`. * if `R` is `_Tp&` and `_Tp&` decays to `_Tp*` we call `true_type __test(_Tp*)`. Only references to function types decay to a pointer of the same type. * In all other cases we call `false_type __test(...)`. `__source<_Tp>(0)` will try and form `_Tp&` in the return type. if `_Tp&` is not well formed the return type of `__source<_Tp>(0)` will be dummy type. `_Tp&` is only ill-formed for cv/ref qualified function types (and void which is dealt with elsewhere). This fixes PR20084 - http://llvm.org/bugs/show_bug.cgi?id=20084 Reviewers: rsmith, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7573 llvm-svn: 229696
* [libcxx] Add <experimental/ratio>Eric Fiselier2015-02-1711-0/+481
| | | | | | | | | | | | | | | | | Summary: This patch is pretty simple. It just adds the _v traits from <ratio>. The draft can be found here. Reviewers: jroelofs, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7351 llvm-svn: 229509
* Implement C++14's sized deallocation functions, since there are no longer ↵Larisse Voufo2015-02-152-1/+39
| | | | | | implicitly defined by clang, as of r229241. llvm-svn: 229281
* Handle function name conflicts in _LIBCPP_MSVCRT modeSaleem Abdulrasool2015-02-138-0/+28
| | | | | | | | | | Visual Studio's SAL extension uses a macro named __deallocate. This macro is used pervasively, and gets included through various different ways. This conflicts with the similarly named interfaces in libc++. Introduce a undef header similar to __undef_min_max to handle this. This fixes a number of errors due to the macro replacing the function name. llvm-svn: 229162
* cctype: tweak inclusions for _LIBCPP_MSVCRT caseSaleem Abdulrasool2015-02-131-0/+1
| | | | | | | | cctype uses ctype functions such as isblank. However, when building against msvcrt, this is provided by the support header. Include the support header if building for Windows to ensure that the definition is properly visible. llvm-svn: 229161
* Rooting out more undefined behavior in char_traits.Marshall Clow2015-02-1317-8/+32
| | | | llvm-svn: 229119
* Appease buildbotsJonathan Roelofs2015-02-131-2/+2
| | | | llvm-svn: 229114
* Modularize TargetInfo discovery in the lit configJonathan Roelofs2015-02-134-29/+98
| | | | | | | | | | When the remote execution patch lands, this will allow us to drop in a replacement TargetInfo object for locale support discovery, alleviating the assumption that host==target. http://reviews.llvm.org/D7601 llvm-svn: 229111
* Fix error checking in get_temp_file_name().Dan Albert2015-02-131-4/+7
| | | | | | | | | | 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 llvm-svn: 229035
* Move the test for zero-length into the char_traits (from string_view). Add ↵Marshall Clow2015-02-126-3/+7
| | | | | | tests to char_traits specializations llvm-svn: 228981
* Fixed a problem that UBSAN found, where we were calling memcmp(null, p, 0) - ↵Marshall Clow2015-02-121-1/+1
| | | | | | which is undefined behavior llvm-svn: 228952
* Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)Marshall Clow2015-02-121-1/+1
| | | | llvm-svn: 228928
* Remove undefined behavior from test; specifically, compare(NULL, XXX, 0). ↵Marshall Clow2015-02-121-2/+1
| | | | | | Thanks to Eric for the catch llvm-svn: 228927
* Change some template parameter names from _C and _N to _Cont and _Sz. No ↵Marshall Clow2015-02-111-14/+14
| | | | | | functionality change. llvm-svn: 228843
* Need to wrap a bit in an ifdef, since there are no initializer_lists in C++03Marshall Clow2015-02-111-0/+2
| | | | llvm-svn: 228840
* Fix PR 22541: When values are equal, minmax should return the rightmost one ↵Marshall Clow2015-02-112-6/+41
| | | | | | in the initializer_list llvm-svn: 228839
* Update double_include.sh.cpp for new headers.Eric Fiselier2015-02-111-0/+2
| | | | llvm-svn: 228784
* libc++ tests: wait_until.pass test sporadically fails (bug 21998)Eric Fiselier2015-02-112-194/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 228783
* Make convert_to_integral.pass.cpp more platform generic.Eric Fiselier2015-02-111-3/+5
| | | | | | Don't depend on the underlying types of enums and wchar_t. llvm-svn: 228781
* Remove default definition for libcxx_obj_dir because it doesn't make senseEric Fiselier2015-02-111-6/+6
| | | | llvm-svn: 228778
* Make ABI header not found a warning, not an error.Dan Albert2015-02-101-1/+1
| | | | | | | | | | 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. llvm-svn: 228720
* Add pragma system header to some experimental headers and add newlines to files.Eric Fiselier2015-02-107-4/+23
| | | | llvm-svn: 228712
* Fix more issues exposed by -pedantic-errors in c++03 modeEric Fiselier2015-02-1029-28/+30
| | | | llvm-svn: 228711
* Remove use of zero length arrays in tests. Get tests passing with ↵Eric Fiselier2015-02-108-228/+58
| | | | | | -pedantic-errors llvm-svn: 228706
OpenPOWER on IntegriCloud