summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-1240-0/+1486
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* Update the failure annotations for the uncaught_exceptions test. The ↵Marshall Clow2018-09-121-5/+5
| | | | | | underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1. llvm-svn: 342063
* Selectively import timespec_get into namespace std, since some C libraries ↵Marshall Clow2018-08-151-1/+1
| | | | | | don't have it. Reviewed as https://reviews.llvm.org/D50799 llvm-svn: 339816
* Mark the at_exit and at_quick_exit tests as unsupported under C++98 an 03, ↵Marshall Clow2018-08-153-2/+3
| | | | | | since those calls were introduced in C++11. They're already guarded by an ifdef in the code, so this is a 'belt-and-suspenders' change. llvm-svn: 339804
* [libcxx] Fix XFAILs for aligned allocation tests on older OSX versionsLouis Dionne2018-08-1515-96/+185
| | | | | | | | | | | | | | | | | Summary: Since r338934, Clang emits an error when aligned allocation functions are used in conjunction with a system libc++ dylib that does not support those functions. This causes some tests to fail when testing against older libc++ dylibs. This commit marks those tests as UNSUPPORTED, and also documents the various reasons for the tests being unsupported. Reviewers: vsapsai, EricWF Subscribers: christof, dexonsmith, cfe-commits, mclow.lists, EricWF Differential Revision: https://reviews.llvm.org/D50341 llvm-svn: 339743
* [libc++] Disable failing C11 feature tests for <cfloat> and <float.h>Louis Dionne2018-08-151-3/+3
| | | | | | | | | | | | | | Summary: Those tests are breaking the test bots. A Bugzilla has been filed to make sure those tests are re-enabled: https://bugs.llvm.org/show_bug.cgi?id=38572 Reviewers: mclow.lists, EricWF Subscribers: krytarowski, christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50748 llvm-svn: 339742
* [libc++] Add missing #include in C11 features testsLouis Dionne2018-08-141-0/+2
| | | | | | | | | | | | | | | | | | Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 llvm-svn: 339675
* Final bit of P0063 - make sure that aligned_alloc is available when the ↵Marshall Clow2018-07-311-0/+10
| | | | | | underlying C library supports it llvm-svn: 338457
* Test for the presence of a bunch of new macros for c++17. These macros come ↵Marshall Clow2018-07-311-0/+42
| | | | | | from C11. Part of P0063 llvm-svn: 338454
* import timespec and timespec_get into namespace std if we're under c++17 or ↵Marshall Clow2018-07-311-0/+14
| | | | | | later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet. llvm-svn: 338419
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-06-141-2/+2
| | | | llvm-svn: 334676
* Fix embarrasing typo in uncaught_exceptions. Update tests to really test ↵Marshall Clow2018-05-291-21/+29
| | | | | | this. Thanks to Peter Klotz for calling my attention to this. llvm-svn: 333467
* [libcxx] [test] Fix whitespace, NFC.Stephan T. Lavavej2018-04-123-8/+8
| | | | | | test/std almost always uses spaces; now it is entirely tab-free. llvm-svn: 329978
* Implement P0768r1: Library support for the Spaceship Operator.Eric Fiselier2018-04-066-0/+804
| | | | | | | | | | | | this patch adds the <compare> header and implements all of it except for [comp.alg]. As I understand it, the header is needed by the compiler in when implementing the semantics of operator<=>. For that reason I feel it's important to land this header early, despite all compilers lacking support. llvm-svn: 329460
* Implement P0754R2: The <version> header.Marshall Clow2018-04-031-0/+17
| | | | llvm-svn: 329075
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2018-03-221-1/+1
| | | | llvm-svn: 328264
* Use DoNotOptimize to prevent new/delete elision.Eric Fiselier2018-03-2215-44/+57
| | | | | | | | | | | The new/delete tests, in particular those which test replacement functions, often fail when the optimizer is enabled because the calls to new/delete may be optimized away, regardless of their side-effects. This patch converts the tests to use DoNotOptimize in order to prevent the elision. llvm-svn: 328245
* Implement LWG3034: P0767R1 breaks previously-standard-layout typesMarshall Clow2018-03-211-2/+5
| | | | llvm-svn: 328064
* Implement P0767R1 - Deprecate PODMarshall Clow2018-03-062-1/+12
| | | | llvm-svn: 326801
* Fix most GCC test failures.Eric Fiselier2018-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes almost all currently failing tests when using GCC ToT. The specific changes are: (A) Workaround gcc.gnu.org/PR83921 which rejects variables w/o initializers in constexpr contexts -- even when the variable is an empty class. This bug has been worked around at all callsites by adding an initializer. Additionally a new test, constexpr_init.pass.cpp, has been added to test that Clang doesn't suffer from these bugs. (B) Fix streambuf.assign/swap.pass.cpp. This test was never actually calling the swap method as intended. In fact, the swap function it intended to call was ill-formed when instantiated. GCC diagnosed this ill-formedness w/o needing an instantiation. (C) size_delete11.pass.cpp was fixed by adding c++2a to the list of unsupported dialects. llvm-svn: 322810
* Fix nodiscard failure tests on compilers w/o -verify.Eric Fiselier2018-01-171-1/+1
| | | | | | | | | | | | | Previously .fail.cpp tests for nodiscard were run with -Wunused-result being a warning, not an error, when the compiler didn't support -verify. When -verify isn't enabled this change judiciously adds -Werror=unused-result when to only the failure tests containing the // expected-error string for nodiscard. As a drive-by change, this patch also adds a missing // UNSUPPORTED: c++2a to a test which was only supposed to run in C++ <= 11. llvm-svn: 322776
* Commit tests for changes in revision 319710Marshall Clow2017-12-0410-0/+252
| | | | llvm-svn: 319711
* Implement p0137r1 - std::launder. Reviewed as https://reviews.llvm.org/D40144Marshall Clow2017-11-223-0/+96
| | | | llvm-svn: 318864
* [test] Alignment must be > __STDCPP_DEFAULT_NEW_ALIGNMENT__ to call aligned newCasey Carter2017-11-1510-10/+10
| | | | | | Differential Revision: D39221 llvm-svn: 318325
* Change test suite to support c++17 dialect flag instead of c++1z.Eric Fiselier2017-11-072-2/+2
| | | | | | | | This patch changes the test suite to attempt and prefer -std=c++17 over -std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers to refer to c++17 over c++1z. llvm-svn: 317610
* Placate unused variable warnings uncovered by improvements to clang's ↵Benjamin Kramer2017-10-142-0/+2
| | | | | | -Wunused-variable llvm-svn: 315809
* [libc++] Support Microsoft ABI without vcruntime headersShoaib Meenai2017-10-093-0/+3
| | | | | | | | | | | | | | | | | The vcruntime headers are hairy and clash with both libc++ headers themselves and other libraries. libc++ normally deals with the clashes by deferring to the vcruntime headers and silencing its own definitions, but for clients which don't want to depend on vcruntime headers, it's desirable to support the opposite, i.e. have libc++ provide its own definitions. Certain operator new/delete replacement scenarios are not currently supported in this mode, which requires some tests to be marked XFAIL. The added documentation has more details. Differential Revision: https://reviews.llvm.org/D38522 llvm-svn: 315234
* [libcxx] [test] Rename _Tp to T. NFCI.Stephan T. Lavavej2017-08-111-2/+2
| | | | | | | This improves readability and (theoretically) improves portability, as _Ugly names are reserved. llvm-svn: 310758
* [libcxx] [test] Change comments to say C++ instead of c++. NFC.Stephan T. Lavavej2017-07-293-5/+5
| | | | | | | | This makes them consistent (many comments already used uppercase). The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. llvm-svn: 309468
* [libcxx] [test] Make files consistently end with newlines, NFC.Stephan T. Lavavej2017-07-291-1/+1
| | | | llvm-svn: 309465
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-2918-133/+133
| | | | llvm-svn: 309464
* Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"Akira Hatanaka2017-06-301-36/+0
| | | | | | | | | | | | | 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
* [libcxx] Annotate c++17 aligned new/delete operators with availabilityAkira Hatanaka2017-06-261-0/+36
| | | | | | | | | | | | | | | | | | | | | | | 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
* [test] Add specific test for P0138R2, direct-list-init of fixed enums from ↵Casey Carter2017-05-121-0/+21
| | | | | | | | integers, part 3/3. Test the C++17 Core Language feature independently from other std::byte tests. llvm-svn: 302946
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 2/3.Casey Carter2017-05-1215-45/+0
| | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part activates the tests for more compilers. llvm-svn: 302945
* [test] Avoid P0138R2, direct-list-init of fixed enums from integers, part 1/3.Casey Carter2017-05-1215-34/+34
| | | | | | | | | | | This C++17 Core Language feature isn't necessary when testing std::byte. It's a minor convenience, but it limits test coverage to very new compilers. This part changes the code. Fixes D32386. llvm-svn: 302944
* Fix GCC 7 test failures.Eric Fiselier2017-05-0910-10/+13
| | | | | | | | | | | This patch fixes the test failures and unexpected passes that occur when testing against GCC 7. Specifically: * don't mark __gcd as always inline because it's a recursive function. GCC diagnoses this. * don't XFAIL the aligned allocation tests. GCC 7 supports them but not the -faligned-allocation option. * Work around gcc.gnu.org/PR78489 in variants constructors. llvm-svn: 302488
* [libc++] Implement exception_ptr on WindowsEric Fiselier2017-05-0810-27/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC. The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it requires libc++ to link to the MSVC STL. However this doesn't seem to cause any immediate problems. However to be safe I kept all usages within the libc++ dylib so that user programs wouldn't have to link to MSVCPRT as well. Note there are still 2 outstanding exception_ptr/nested_exception test failures. * `current_exception.pass.cpp` needs to be rewritten for the Windows exception_ptr semantics which copy the exception every time. * `rethrow_if_nested.pass.cpp` need investigation. It hits a stack overflow, likely from recursion. This patch also gets most of the `<future>` tests passing as well. Reviewers: mclow.lists, compnerd, bcraig, rmaprath, majnemer, BillyONeal, STL_MSFT Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D32927 llvm-svn: 302393
* Temporarly XFAIL aligned new/delete tests on Windows.Eric Fiselier2017-05-078-2/+43
| | | | | | | | | | | | | Libc++ doesn't provide its own definitions of new/delete on Windows, instead using the versions provided by VCRuntime. However VCRuntime does not yet implement aligned new/delete so these tests fail. It might be possible for libc++ to provide its own definitions only for aligned new/delete as long as MSVC doesn't provide it. However before this can be done libc++ needs to figure out how to implement std::get_new_handler. llvm-svn: 302384
* Add markup for libc++ dylib availabilityMehdi Amini2017-05-0411-3/+76
| | | | | | | | | | | | | | | Libc++ is used as a system library on macOS and iOS (amongst others). In order for users to be able to compile a binary that is intended to be deployed to an older version of the platform, clang provides the availability attribute <https://clang.llvm.org/docs/AttributeReference.html#availability>_ that can be placed on declarations to describe the lifecycle of a symbol in the library. See docs/DesignDocs/AvailabilityMarkup.rst for more information. Differential Revision: https://reviews.llvm.org/D31739 llvm-svn: 302172
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-05-0411-17/+17
| | | | llvm-svn: 302105
* Mark exception_ptr tests as XFAIL on Windows for nowEric Fiselier2017-04-2110-1/+31
| | | | llvm-svn: 300942
* Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros for std::initializer_listEric Fiselier2017-04-185-15/+27
| | | | llvm-svn: 300623
* [test] Silence unused parameter/typedef warningsCasey Carter2017-04-181-1/+1
| | | | llvm-svn: 300575
* Implement LWG#2855 - made easy by previous refactoringMarshall Clow2017-04-131-0/+10
| | | | llvm-svn: 300218
* Mark *pass tests as UNUSUPPORTED instead of XFAIL on old compilersMarshall Clow2017-03-2712-24/+24
| | | | llvm-svn: 298839
* Mark *fail tests as UNUSUPPORTED instead of XFAIL on old compilersMarshall Clow2017-03-275-10/+10
| | | | llvm-svn: 298832
* XFAIL the std::byte tests on a bunch of old clang versions, because they ↵Marshall Clow2017-03-2417-0/+51
| | | | | | don't like 'std::byte b1{1}' llvm-svn: 298706
* Implement P0298R3: 'std::byte'. Reviewed as https://reviews.llvm.org/D31022Marshall Clow2017-03-2418-0/+562
| | | | llvm-svn: 298689
* Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and ↵Marshall Clow2017-03-141-1/+32
| | | | | | 2838 as complete - since we do them already llvm-svn: 297752
OpenPOWER on IntegriCloud