summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx] Add a script to run CI on older MacOS versionsLouis Dionne2019-01-091-0/+180
| | | | | | | | This script can be used by CI systems to test things like availability markup and binary compatibility on older MacOS versions. This is still a bit rough on the edges, for example we don't test libc++abi yet. llvm-svn: 350752
* [libcxx] Add a script to run CI on MacOSLouis Dionne2019-01-091-0/+153
| | | | | | | CI systems like Green Dragon should use this script so as to make reproducing errors easy locally. llvm-svn: 350740
* Mark two UDL tests as being unsupported with Clang 7Eric Fiselier2019-01-092-2/+2
| | | | llvm-svn: 350739
* [libcxx] Remove outdated XFAILs for aligned deallocationLouis Dionne2019-01-091-10/+0
| | | | | | AppleClang 10 has been fixed and so these tests don't fail anymore. llvm-svn: 350736
* Mark two more tests as FLAKYEric Fiselier2019-01-092-0/+4
| | | | llvm-svn: 350692
* [Sema] Teach Clang that aligned allocation is not supported with macosx10.13Louis Dionne2019-01-082-9/+18
| | | | | | | | | | | | | | | | | Summary: r306722 added diagnostics when aligned allocation is used with deployment targets that do not support it, but the first macosx supporting aligned allocation was incorrectly set to 10.13. In reality, the dylib shipped with macosx10.13 does not support aligned allocation, but the dylib shipped with macosx10.14 does. Reviewers: ahatanak Subscribers: christof, jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D56445 llvm-svn: 350649
* Set the buffer of an fstream to empty when the underlying file is closed. ↵Marshall Clow2019-01-082-0/+36
| | | | | | This 'fixes' PR#38052 - std::fstream still good after closing and updating content. llvm-svn: 350603
* [libcxx] Optimize vectors construction of trivial types from an iterator ↵Volodymyr Sapsai2019-01-082-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range with const-ness mismatch. We already have a specialization that will use memcpy for construction of trivial types from an iterator range like std::vector<int>(int *, int *); But if we have const-ness mismatch like std::vector<int>(const int *, const int *); we would use a slow path that copies each element individually. This change enables the optimal specialization for const-ness mismatch. Fixes PR37574. Contributions to the patch are made by Arthur O'Dwyer, Louis Dionne. rdar://problem/40485845 Reviewers: mclow.lists, EricWF, ldionne, scanon Reviewed By: ldionne Subscribers: christof, ldionne, howard.hinnant, cfe-commits Differential Revision: https://reviews.llvm.org/D48342 llvm-svn: 350583
* Mark more tests as flakyEric Fiselier2019-01-075-0/+10
| | | | llvm-svn: 350550
* Add the feature test macros that were defined in p1353r0 to the headers of ↵Marshall Clow2019-01-073-1/+35
| | | | | | the appropriate tests. No actual tests yet, so NFC. llvm-svn: 350535
* [libcxx] Support building hermetic static libraryPetr Hosek2019-01-063-33/+72
| | | | | | | | | | | | This is useful when static libc++ library is being linked into shared libraries that may be used in combination with libraries. We want to avoid we exporting libc++ symbols in those cases where this option is useful. This is provided as a CMake option and can be enabled by libc++ vendors as needed. Differential Revision: https://reviews.llvm.org/D55404 llvm-svn: 350489
* Fix PR39749 - Headers containing just #error harm __has_include.Eric Fiselier2019-01-0624-19/+411
| | | | | | | | | | | This patch changes <experimental/foo> to use #warning instead of is harmful to common feature detection idioms. We should also consider only emitting the warning when __DEPRECATED is defined, like we do in the <ext/foo> headers. Users may want to specify "-Werror=-W#warnings" while still ignoring the libc++ warnings. llvm-svn: 350485
* Fix flaky symlink access time test.Eric Fiselier2019-01-051-5/+7
| | | | | | | | | | | | | | | last_write_time(sym, new_time) changes the modification time of the file referenced by the symlink. But reading through the symlink may change the symlinks's access time. This meant the previous test that checked that the symlinks access time was unchanged was incorrect and made the test flaky. This patch removes this test (there really is no non-flaky way to test that the new access time coorisponds to the time at which the symlink was last dereferenced). This should unflake the test. llvm-svn: 350478
* Revert "D56064: More tolerance for flaky tests in libc++ on NetBSD"Kamil Rytarowski2019-01-051-7/+0
| | | | | | Requested by EricWF. llvm-svn: 350477
* De-tab a couple tests. NFCMarshall Clow2019-01-033-6/+6
| | | | llvm-svn: 350330
* More tolerance for flaky tests in libc++ on NetBSDKamil Rytarowski2018-12-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tests marked with the flaky attribute ("FLAKY_TEST.") can still report false positives in local tests and on the NetBSD buildbot. Additionally a number of tests (probably all threaded ones) unmarked with the flaky attribute is flaky on NetBSD. An ideal solution on the libcxx side would be to raise max retries for NetBSD and mark failing tests with the flaky flag, however this adds more maintenance burden and constant monitoring of flaky tests. Reduce the work and handle flaky tests as more flaky on NetBSD and allow flakiness of other tests on NetBSD. Reviewers: mgorny, EricWF Reviewed By: mgorny Subscribers: christof, llvm-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D56064 llvm-svn: 350170
* [libcxx] Remove unused macro _LIBCPP_HAS_UNIQUE_TYPEINFOLouis Dionne2018-12-211-6/+2
| | | | | | | | | | | | | | Summary: We already have the negation of that as _LIBCPP_HAS_NONUNIQUE_TYPEINFO. Having both defined is confusing, since only one of them is used. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D54537 llvm-svn: 349947
* [NFC] Fix typo in commentLouis Dionne2018-12-211-1/+1
| | | | llvm-svn: 349932
* Fix test case breakages caused by lexically_relative changeEric Fiselier2018-12-211-3/+3
| | | | llvm-svn: 349888
* Don't forward declare _FilesystemClock in C++03Eric Fiselier2018-12-211-0/+2
| | | | llvm-svn: 349887
* Fix copy paste error in file_clock testsEric Fiselier2018-12-211-3/+3
| | | | llvm-svn: 349886
* Implement LWG 3096: path::lexically_relative is confused by trailing slashesEric Fiselier2018-12-213-6/+9
| | | | | | path("/dir/").lexically_relative("/dir"); now returns "." instead of "" llvm-svn: 349885
* Implement LWG 3065: Make path operators friends.Eric Fiselier2018-12-215-39/+89
| | | | | | | | | This prevents things like: using namespace std::filesystem; auto x = L"a/b" == std::string("a/b"); llvm-svn: 349884
* Implement LWG 3145: file_clock breaks ABI for C++17 implementations.Eric Fiselier2018-12-217-32/+171
| | | | | | | This patch adds std::chrono::file_clock, but without breaking the existing ABI for std::filesystem. llvm-svn: 349883
* Implement LWG 2936: Path comparison is defined in terms of the generic formatEric Fiselier2018-12-213-15/+139
| | | | | | | | | This patch implements path::compare according to the current spec. The only observable change is the ordering of "/foo" and "foo", which orders the two paths based on having or not having a root directory (instead of lexically comparing "/" to "foo"). llvm-svn: 349881
* Mark two filesystem LWG issues as complete - nothing to doEric Fiselier2018-12-211-2/+2
| | | | llvm-svn: 349877
* [libcxx] Fix order checking in unordered_multimap tests.Louis Dionne2018-12-206-152/+379
| | | | | | | | | | | | | | | Some tests assume that iteration through an unordered multimap elements will return them in the same order as at the container creation. This assumption is not true since the container is unordered, so that no specific order of elements is ever guaranteed for such container. This patch introduces checks verifying that any iteration will return elements exactly from a set of valid values and without repetition, but in no particular order. Reviewed as https://reviews.llvm.org/D54838. Thanks to Andrey Maksimov for the patch. llvm-svn: 349780
* [libcxx] Use custom allocator's `construct` in C++03 when available.Volodymyr Sapsai2018-12-195-22/+193
| | | | | | | | | | | | | | | | | Makes libc++ behavior consistent between C++03 and C++11. Can use `decltype` in C++03 because `include/__config` defines a macro when `decltype` is not available. Reviewers: mclow.lists, EricWF, erik.pilkington, ldionne Reviewed By: ldionne Subscribers: dexonsmith, cfe-commits, howard.hinnant, ldionne, christof, jkorous, Quuxplusone Differential Revision: https://reviews.llvm.org/D48753 llvm-svn: 349676
* Work around GCC 9.0 regressionEric Fiselier2018-12-191-1/+2
| | | | llvm-svn: 349663
* Add missing include to test. NFCMarshall Clow2018-12-191-0/+1
| | | | llvm-svn: 349639
* Portability fix: add missing includes and static_casts. Reviewed as ↵Marshall Clow2018-12-1823-4/+34
| | | | | | https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch. llvm-svn: 349566
* Rework the C strings tests to use ASSERT_SAME_TYPE. NFC there. Also change ↵Marshall Clow2018-12-185-135/+148
| | | | | | cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used. llvm-svn: 349522
* [libcxx] Remove XFAILs for older macOS versionsLouis Dionne2018-12-181-3/+0
| | | | | | | That test doesn't fail anymore since r349378, since the assertions that r349378 removed must have been bugs in the dylib at some point. llvm-svn: 349484
* [libcxx] Handle AppleClang 9 and 10 in XFAILs for aligned allocation testsLouis Dionne2018-12-181-7/+8
| | | | | | I forgot that those don't behave like Clang trunk, again. llvm-svn: 349427
* [libcxx] Properly mark aligned allocation macro test as XFAIL on OS XLouis Dionne2018-12-181-6/+6
| | | | | | | | | This test was initially marked as XFAIL using `XFAIL: macosx10.YY`, and was then moved to `UNSUPPORTED: macosx10.YY`. The intent is to mark the test as XFAILing when a deployment target older than macosx10.14 is used, and the right way to do this is `XFAIL: availability=macosx10.YY`. llvm-svn: 349426
* [libcxx][NFC] Properly indent nested #ifdefs and #definesLouis Dionne2018-12-171-7/+7
| | | | | | | I just realized I had always been reading this wrong because of the lack of indentation, so I'm re-indenting this properly. llvm-svn: 349408
* Fix FP comparisons when SSE isn't availableEric Fiselier2018-12-175-30/+66
| | | | llvm-svn: 349387
* [test] Add target_info for NetBSD, and XFAIL some of locale testsMichal Gorny2018-12-1731-0/+103
| | | | | | | | | | | | | | | | | | | | Add a target_info definition for NetBSD. The definition is based on the one used by FreeBSD, with libcxxrt replaced by libc++abi, and using llvm-libunwind since we need to use its unwinder implementation to build anyway. Additionally, XFAIL the 30 tests that fail because of non-implemented locale features. According to the manual, NetBSD implements only LC_CTYPE part of locale handling. However, there is a locale database in the system and locale specifications are validated against it, so it makes sense to list the common locales as supported. If I'm counting correctly, this change enables additional 43 passing tests. Differential Revision: https://reviews.llvm.org/D55767 llvm-svn: 349379
* [test] [re.traits] Remove asserts failing due to invalid UTF-8Michal Gorny2018-12-171-5/+0
| | | | | | | | | | | Remove the two test cases for \xDA and \xFA with UTF-8 locale, as both characters alone are invalid in UTF-8 (short sequences). Upon removing them, the test passes on Linux again (and also on NetBSD, after adding appropriate locale configuration). Differential Revision: https://reviews.llvm.org/D55746 llvm-svn: 349378
* Unbreak green dragon bots w/o __builtin_launderEric Fiselier2018-12-171-2/+2
| | | | llvm-svn: 349373
* Expect Clang diagnostics in std::launder testEric Fiselier2018-12-171-0/+2
| | | | llvm-svn: 349364
* [libcxx] Speeding up partition_point/lower_bound/upper_boundLouis Dionne2018-12-173-4/+210
| | | | | | | | | | This is a re-application of r345525, which had been reverted by fear of a regression. Reviewed as https://reviews.llvm.org/D53994. Thanks to Denis Yaroshevskiy for the patch. llvm-svn: 349358
* [test] [support] Use socket()+bind() to create unix sockets portablyMichal Gorny2018-12-161-2/+8
| | | | | | | | | | | Replace the mknod() call with socket() + bind() for creating unix sockets. The mknod() method is not portable and does not work on NetBSD while binding the socket should work on all systems supporting unix sockets. Differential Revision: https://reviews.llvm.org/D55576 llvm-svn: 349305
* [test] [ctime] Ignore -Wformat-zero-length warningsMichal Gorny2018-12-161-0/+4
| | | | | | | | | | | | Explicitly disable the -Wformat-zero-length diagnostic when running ctime tests, since one of the test cases passes zero-length format string to strftime(). When strftime() is appropriately decorated with __attribute__(format, ...), this caused the test to fail because of this warning (e.g. on NetBSD). Differential Revision: https://reviews.llvm.org/D55661 llvm-svn: 349294
* [regex] Use distinct __regex_word on NetBSDMichal Gorny2018-12-161-0/+4
| | | | | | | | | | NetBSD defines character classes up to 0x2000. Use 0x8000 as a safe __regex_word that hopefully will not collide with other values in the foreseeable future. Differential Revision: https://reviews.llvm.org/D55657 llvm-svn: 349293
* Fix static assert diagnostic checks in i386Eric Fiselier2018-12-155-5/+5
| | | | llvm-svn: 349252
* Try 2: Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349236
* Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349235
* Rework docker setup to make it easier to work around bugs on buildbotsEric Fiselier2018-12-153-2/+19
| | | | llvm-svn: 349234
* Tolerate Clangs new static_assert messagesEric Fiselier2018-12-146-6/+6
| | | | llvm-svn: 349189
OpenPOWER on IntegriCloud