summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix issues with UBSAN test configuration.Eric Fiselier2017-07-102-5/+1
| | | | | | | | On Apple the test feature 'sanitizer-new-delete' was incorrectly getting added to the LIT feature set, which mistakenly caused tests to be disabled when using UBSAN (the feature is only needed with ASAN/MSAN/TSAN). llvm-svn: 307518
* Work around PR31864 - ATOMIC_LLONG_LOCK_FREE is incorrect in 32 bit buildsEric Fiselier2017-07-101-2/+35
| | | | llvm-svn: 307517
* Fix test failure to to new/delete ellisionsEric Fiselier2017-07-091-2/+3
| | | | llvm-svn: 307510
* optional: Implement LWG 2900 and P0602Casey Carter2017-07-096-107/+145
| | | | | | Differential Revision: https://reviews.llvm.org/D32385 llvm-svn: 307505
* Fix filesystem build on platforms with weird time_t types.Eric Fiselier2017-07-084-144/+382
| | | | | | | | | | | | | | 32-bit powerpc provides a 64 bit time_t type and older ppc64 systems provide time_t as a floating point type. This caused problems when building operations.cpp since operations.cpp contained compile time tests for conversions between time_t and filesystem time type. When these tests failed they caused the libc++ build to fail as well. This is unfortunate. This patch moves the tests out of the source file and into the test suite. It also expands the tests to allow testing of the weird time_t configurations on all platforms. llvm-svn: 307461
* Fix diagnostic in verify test to match new Clang outputEric Fiselier2017-07-071-1/+1
| | | | llvm-svn: 307450
* cmath: Support clang's -fdelayed-template-parsingDuncan P. N. Exon Smith2017-07-075-88/+119
| | | | | | | | | | | r283051 added some functions to cmath (in namespace std) that have the same name as functions in math.h (in the global namespace). Clang's limited support for `-fdelayed-template-parsing` chokes on this. Rename the ones in `cmath` and their uses in `complex` and the test. rdar://problem/32848355 llvm-svn: 307357
* Suppress -Waligned-allocation-unavailable warning in libc++ test suiteEric Fiselier2017-07-051-0/+1
| | | | llvm-svn: 307218
* Fix a bug in regex_Iterator where it would report zero-length matches ↵Marshall Clow2017-07-052-1/+19
| | | | | | forever. Reported as http://llvm.org/PR33681. Thanks to Karen Arutyunov for the report. llvm-svn: 307171
* Fix equivalent test on OS X and FreeBSDEric Fiselier2017-07-051-7/+7
| | | | llvm-svn: 307119
* Add dummy CMake target for *.pass.cpp tests when LIBCXX_CONFIGURE_IDE=ON.Eric Fiselier2017-07-051-0/+33
| | | | | | | | | | | | | | | | In order for IDE's like CLion to correctly parse and highlight the tests it needs to know roughly how to build them. This patch adds a dummy CMake target for each/all of the .pass.cpp tests in the test suite to solve this problem. The target is only created when LIBCXX_CONFIGURE_IDE=ON, so it shouldn't affect most users. Originally I wasn't sure that this change deserved to live upstream, but it's quite frustrating to edit libc++ tests using CLion or Visual Studio without it, in particular the filesystem tests which rely heavily on macros. Even though the change should have no effect on non-IDE users/configurations I decided to commit it upstream with the hopes it will benefit somebody other than me. llvm-svn: 307118
* Implement LWG 2937 - equivalent("dne", "exists") is not an errorEric Fiselier2017-07-053-59/+86
| | | | | | | | | | | | | | This patch speculatively implements the PR for LWG 2937, which fixes two issues with equivalent. (1) It makes equivalent("dne", "exists") an error. Previously only equivalent("dne", "dne") was an error and the former case was not (it returned false). Now equivalent reports an error when either input doesn't exist. (2) It makes equivalent(p1, p2) well-formed when `is_other(p1) && is_other(p2)`. Previously this was an error, but there is seemingly no reason why it should be on POSIX system. llvm-svn: 307117
* Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"Akira Hatanaka2017-06-303-52/+10
| | | | | | | | | | | | | This reverts commit r306310. r306310 causes clang to reject a call to an aligned allocation or deallocation function if it is not implemented in the standard library of the deployment target. This is not the desired behavior when users have defined their own aligned functions. rdar://problem/32664169 llvm-svn: 306859
* [lit/libcxx] Fix a remaining reference to lit.util.capture() in custom ↵David L. Jones2017-06-291-5/+6
| | | | | | | | | | | | | | | | | | | libcxx/Darwin code. Summary: This reference to lit.util.capture is functionally identical to subprocess.check_output, so this change switches to call the library routine directly. Reviewers: mzolotukhin, EricWF Reviewed By: mzolotukhin Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D34841 llvm-svn: 306755
* [libc++] Hoist explicit instantiation above implicit. NFCShoaib Meenai2017-06-291-4/+4
| | | | | | | | | | | | | | | | The string literal operators have implicit instantiations of basic_string<char> and basic_string<wchar>, which prevent the dllimport on the subsequent explicit instantiation declarations from having an effect. Hoisting the explicit instantiations above the implicit ones fixes the issue. I think it's pretty unfortunate that the ordering has such an effect, and I'd fixed the same issue for dllexport in r288682. dllimport is more complicated from a codegen perspective, however, and clang's behavior of ignoring the dllimport when there's a previous implicit instantiation is consistent with cl, so changing the order is our only recourse. llvm-svn: 306632
* Updated notest on 2974Marshall Clow2017-06-281-2/+2
| | | | llvm-svn: 306581
* Added failing tests for index out of range for tuple_element<pair<T1,T2>> ↵Marshall Clow2017-06-282-0/+54
| | | | | | and variant_alternative<> llvm-svn: 306580
* [libcxx] Annotate c++17 aligned new/delete operators with availabilityAkira Hatanaka2017-06-263-10/+52
| | | | | | | | | | | | | | | | | | | | | | | attribute. This is needed because older versions of libc++ do not have these operators. If users target an older deployment target and try to compile programs in which these operators are explicitly called, the compiler will complain. The following is the list of minimum deployment targets for the four OSes: macosx: 10.13 ios: 11.0 tvos: 11.0 watchos: 4.0 rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D34556 llvm-svn: 306310
* Updated for the Toronto meetingMarshall Clow2017-06-261-57/+27
| | | | llvm-svn: 306269
* Implement inclusive_scan/transform_inclusive_scan for C++17.Marshall Clow2017-06-236-0/+722
| | | | llvm-svn: 306083
* Attempt to avoid static init ordering issues with globalMemCounterEric Fiselier2017-06-211-5/+10
| | | | llvm-svn: 305955
* [libcxx] [test] Fix -Wmismatched-tags in ↵Stephan T. Lavavej2017-06-201-2/+4
| | | | | | | | | | | | tuple_size_structured_bindings.pass.cpp. Clang and C1XX both complain about mismatched class/struct, but libc++ and MSVC's STL differ on what they use for tuple_element/tuple_size, so there's no way to win here. I'm reverting this part of my previous change. In the future, I'll have to suppress the warning for one compiler or the other. llvm-svn: 305854
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-06-2014-32/+31
| | | | llvm-svn: 305848
* [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp ↵Stephan T. Lavavej2017-06-201-6/+16
| | | | | | | | | | | | | | | | | | | and make it friendlier to C1XX. Style/paranoia: 42.1 doesn't have an exact binary representation. Although this doesn't cause failures, it makes me uncomfortable, so I'm changing it to 42.5. C1XX rightly warns about unreferenced variables. Adding tests for their values makes C1XX happy and improves test coverage. C1XX (somewhat obnoxiously) warns about seeing a struct specialized as a class. Although the Standard doesn't care, saying struct consistently is better. (The Standard itself is still inconsistent about whether to depict tuple_element and tuple_size as structs or classes.) Fixes D33953. llvm-svn: 305843
* Fix discovery of cxxabi.h in the monorepo layoutReid Kleckner2017-06-201-0/+1
| | | | llvm-svn: 305841
* Add a missing SFINAE condition to the `variant`'s converting constructor.Michael Park2017-06-192-0/+16
| | | | | | | | | | | | | | | | | | | | | Remarks: This function shall not participate in overload resolution unless `is_same_v<decay_t<T>, variant>` is false, unless `decay_t<T>` is neither a specialization of `in_place_type_t` nor a specialization of `in_place_index_t`, unless `is_constructible_v<Tj, T>` is true, and unless the expression `FUN(std::forward<T>(t))` (with `FUN` being the above-mentioned set of imaginary functions) is well formed. Depends on D34111. Reviewers: EricWF, K-ballo Reviewed By: EricWF Subscribers: fhahn Differential Revision: https://reviews.llvm.org/D34112 llvm-svn: 305668
* path: Use string_view_t consistentlyDuncan P. N. Exon Smith2017-06-191-2/+3
| | | | | | | | | Most of filesystem/path.cpp uses string_view_t. This fixes the two spots that use string_view directly. https://reviews.llvm.org/D34332 llvm-svn: 305661
* iostreams: Fix deployment target for streams dylib supportDuncan P. N. Exon Smith2017-06-181-2/+2
| | | | | | | | | | | | | | Fix an off-by-one in r302172, which triggered building local versions of the iostreams when deploying to `<= macOS 10.9`, when it should have been `< macOS 10.9`. 10.9 had the dylib support. This defines `_LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE` less often, reducing code size for users with deployment targets of exactly macOS 10.9 or iOS 7.0. rdar://problem/32233981 llvm-svn: 305649
* func.wrap.func.con: Fix test commentDuncan P. N. Exon Smith2017-06-181-1/+1
| | | | | | This tests moving `function`, not `const function`. llvm-svn: 305648
* any: Add availability for experimental::bad_any_castDuncan P. N. Exon Smith2017-06-1811-52/+20
| | | | | | | | As a follow up to r302172, add missing availability for bad_any_cast. rdar://problem/32161524 llvm-svn: 305647
* Fix potential bug by casting to the POSIX specified typeEric Fiselier2017-06-161-1/+1
| | | | llvm-svn: 305549
* Allow the libc++ C header wrappers to be included when compiling C.Eric Fiselier2017-06-162-2/+40
| | | | | | | | | | C99 at least. C89 still fails due to the use of block comments. NOTE: Having libc++ on the include path when compiling C is not recommended or ever really supported. However it happens often enough that this change is warrented. llvm-svn: 305539
* Allow coroutine_handle<const T> to support creation from const references to ↵Eric Fiselier2017-06-162-2/+39
| | | | | | | | | | | | | | | the promise_type It seems conceivable that a user would need to get a coroutine handle having only a const reference to the promise_type, for example from within a const member function of the promise. This patch allows that use case. A coroutine_handle<const T> can be used in essentially the same way a coroutine_handle<T>, ie to start and destroy the coroutine. The constness of the promise doesn't/shouldn't propagate to the handle. llvm-svn: 305536
* Add missing include to __bsd_locale_fallbacks.h. Fixes ↵Marshall Clow2017-06-151-0/+1
| | | | | | https://bugs.llvm.org/show_bug.cgi?id=33370 llvm-svn: 305469
* Renamed some of the newly added tests. No functional changeMarshall Clow2017-06-156-0/+0
| | | | llvm-svn: 305453
* attempt to fix GCC ToT build failuresEric Fiselier2017-06-151-1/+1
| | | | llvm-svn: 305451
* Fix another test with modules enabledEric Fiselier2017-06-151-0/+1
| | | | llvm-svn: 305448
* remove incorrectly committed assertionEric Fiselier2017-06-151-1/+0
| | | | llvm-svn: 305447
* Add hack to get --param=enable_modules=true working with a __config_site headerEric Fiselier2017-06-151-3/+17
| | | | llvm-svn: 305446
* Fix test when modules are enabledEric Fiselier2017-06-151-0/+1
| | | | llvm-svn: 305445
* Move external instantiation for __vector_base_common to vector.cppEric Fiselier2017-06-153-2/+17
| | | | | | | | Previously the explicit instantiation for this was in locale.cpp, but that didn't make much sense. This patch creates a new vector.cpp source file to contain the explicit instantiation. llvm-svn: 305442
* [locale] Avoid copy of __atoms when char_type is charAditya Kumar2017-06-143-6/+107
| | | | | | | | | | | | | | | The function num_get<_CharT>::stage2_int_prep makes unnecessary copy of src into atoms when char_type is char. This can be avoided by creating a switch on type and just returning __src when char_type is char. Added the test case to demonstrate performance improvement. In order to avoid ABI incompatibilities, the changes are guarded with a macro _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET Differential Revision: https://reviews.llvm.org/D30268 Reviewed by: EricWF llvm-svn: 305427
* Rework some metaprogramming to use the detection idiom; no functional changeMarshall Clow2017-06-141-99/+58
| | | | llvm-svn: 305417
* Add some const_casts in places where we were implicitly casting away ↵Marshall Clow2017-06-145-13/+15
| | | | | | constness. No functional change, but now they're explicit llvm-svn: 305410
* In several places in std::allocator<const T> (and one in shared_ptr, we were ↵Marshall Clow2017-06-141-9/+11
| | | | | | casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make that explicit. No functional change. llvm-svn: 305397
* PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+James Y Knight2017-06-141-0/+3
| | | | | | | | | | | | | | | | | | | | Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change adds proper guard around that include statement. For newlib 2.4, some releases contain these functions and some don't, and they all have the same version numbers. This patch will work properly with the initial "2.4.0" release which does not include these functions and require __nop_local_mgmt.h. This has been tested against newlib 2.2 and 2.5, and also sanity checks against other different version numbers. Patch by Martin J. O'Riordan and Walter Lee Differential Revision: https://reviews.llvm.org/D32146 llvm-svn: 305394
* Mark `__is_inplace_*` tests as UNSUPPORTED in <= C++14.Michael Park2017-06-142-0/+4
| | | | llvm-svn: 305373
* Add an `__is_inplace_index` metafunction.Michael Park2017-06-143-0/+70
| | | | | | | | | | | | Summary: This is used to constrain `variant`'s converting constructor correctly. Reviewers: EricWF, mclow.lists Reviewed By: EricWF, mclow.lists Differential Revision: https://reviews.llvm.org/D34111 llvm-svn: 305370
* Implement the non-parallel versions of reduce and transform_reduce for C++17Marshall Clow2017-06-147-0/+613
| | | | llvm-svn: 305365
* Fix bug 33389 - __is_transparent check requires too muchMarshall Clow2017-06-1312-23/+80
| | | | llvm-svn: 305292
OpenPOWER on IntegriCloud