summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.dynamic
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Take 2: Implement LWG 2510Louis Dionne2019-09-262-0/+53
| | | | | | | | | | | | | | | | | | | | | | | Summary: LWG2510 makes tag types like allocator_arg_t explicitly default constructible instead of implicitly default constructible. It also makes the constructors for std::pair and std::tuple conditionally explicit based on the explicit-ness of the default constructibility for the pair/tuple's elements. This was previously committed as r372777 and reverted in r372832 due to the commit breaking LLVM's build in C++14 mode. This issue has now been addressed. Reviewers: mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65161 llvm-svn: 372983
* [libc++] Purge mentions of GCC 4 from the test suiteLouis Dionne2019-09-252-8/+0
| | | | | | | | | We don't support GCC 4 and older according to the documentation, so we should pretend it doesn't exist. This is a re-application of r372787. llvm-svn: 372916
* Revert r372777: [libc++] Implement LWG 2510 and its follow-upsIlya Biryukov2019-09-254-53/+8
| | | | | | | | | | | | This also reverts: - r372778: [libc++] Implement LWG 3158 - r372782: [libc++] Try fixing tests that fail on GCC 5 and older - r372787: Purge mentions of GCC 4 from the test suite Reason: the change breaks compilation of LLVM with libc++, for details see http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html llvm-svn: 372832
* [libc++] Purge mentions of GCC 4 from the test suiteLouis Dionne2019-09-243-9/+1
| | | | | | | We don't support GCC 4 and older according to the documentation, so we should pretend it doesn't exist. llvm-svn: 372787
* [libc++] Try fixing tests that fail on GCC 5 and olderLouis Dionne2019-09-241-0/+4
| | | | llvm-svn: 372782
* [libc++] Implement LWG 2510Louis Dionne2019-09-242-0/+49
| | | | | | | | | | | | | | | | | | | Summary: LWG2510 makes tag types like allocator_arg_t explicitly default constructible instead of implicitly default constructible. It also makes the constructors for std::pair and std::tuple conditionally explicit based on the explicit-ness of the default constructibility for the pair/tuple's elements. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65161 llvm-svn: 372777
* libcxx: Rename .hpp files in libcxx/test/support to .hNico Weber2019-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | LLVM uses .h as its extension for header files. Files renamed using: for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; done References to the files updated using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do a=$(basename $f); echo $a; rg -l $a libcxx | xargs sed -i '' "s/$a/${a%.hpp}.h/"; done HPP include guards updated manually using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do echo ${f%.hpp}.h ; done | xargs mvim Differential Revision: https://reviews.llvm.org/D66104 llvm-svn: 369481
* [libcxx] Rejigger test for destroying delete feature-test macrosLouis Dionne2019-07-161-4/+13
| | | | | | | | | In r361572, we introduced library support for C++20 destroying delete and decided to only define the library feature-test macro when the compiler supports the underlying language feature. This patch reworks the tests to mirror that. llvm-svn: 366263
* Mark destroying delete test as UNSUPPORTED with clang 7Eric Fiselier2019-07-121-1/+1
| | | | llvm-svn: 365856
* Add include for 'test_macros.h' to all the tests that were missing them. ↵Marshall Clow2019-05-317-0/+14
| | | | | | Thanks to Zoe for the (big, but simple) patch. NFC intended. llvm-svn: 362252
* fix test for older clang versionsEric Fiselier2019-05-241-0/+1
| | | | llvm-svn: 361594
* fix destroying delete test with older apple compilersEric Fiselier2019-05-242-0/+54
| | | | llvm-svn: 361593
* P0722R3: Implement library support for destroying deleteEric Fiselier2019-05-231-0/+65
| | | | | | | | | | | | | | | | | | Summary: This provides the `std::destroying_delete_t` declaration in C++2a and after. (Even when the compiler doesn't support the language feature). However, the feature test macro `__cpp_lib_destroying_delete` is only defined when we have both language support and C++2a. Reviewers: ldionne, ckennelly, serge-sans-paille, EricWF Reviewed By: EricWF Subscribers: dexonsmith, riccibruno, christof, jwakely, jdoerfert, mclow.lists, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D55840 llvm-svn: 361572
* [libcxx] [test] Revert r356632 add (void) casts to operator new calls, to ↵Billy Robert O'Neal III2019-03-216-6/+6
| | | | | | suppress warnings generated by [[nodiscard]]." llvm-svn: 356635
* [libcxx] [test] Add (void) casts to operator new calls, to suppress warnings ↵Billy Robert O'Neal III2019-03-206-6/+6
| | | | | | | | generated by [[nodiscard]]. This allows these tests to pass when compiled by MSVC++. llvm-svn: 356632
* Support tests in freestandingJF Bastien2019-02-0450-50/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding `main` isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its `return` statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the `return` we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare `main` as `int main(int, char**` so it mangles consistently (enabling us to declare another `extern "C"` main for freestanding which calls the mangled one), and adds `return 0;` to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with `-x c`, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086
* Fix aligned allocation availability XFAILs after D56445.Eric Fiselier2019-01-208-24/+40
| | | | | | | | | | D56445 bumped the minimum Mac OS X version required for aligned allocation from 10.13 to 10.14. This caused libc++ tests depending on the old value to break. This patch updates the XFAILs for those tests to include 10.13. llvm-svn: 351670
* Revert "Fix aligned allocation availability XFAILs after D56445."Eric Fiselier2019-01-208-24/+16
| | | | | | | | | This reverts commit r351625. That fix was incomplete. I'm reverting so I can commit a complete fix in a single revision. llvm-svn: 351669
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1950-200/+150
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* Fix aligned allocation availability XFAILs after D56445.Eric Fiselier2019-01-198-16/+24
| | | | | | | | | | D56445 bumped the minimum Mac OS X version required for aligned allocation from 10.13 to 10.14. This caused libc++ tests depending on the old value to break. This patch updates the XFAILs for those tests to include 10.13. llvm-svn: 351625
* 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] Remove the availability_markup LIT featureLouis Dionne2018-12-072-10/+10
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* [libcxx] Add XFAILs for aligned allocation tests on AppleClang 9Louis Dionne2018-12-068-96/+96
| | | | | | Some people are still running the test suite using AppleClang 9. llvm-svn: 348507
* [libcxx] Fix XFAILs for aligned allocation testsLouis Dionne2018-11-268-132/+152
| | | | | | | | | | In r339743, I marked several aligned allocation tests as downright unsupported on macosx in an attempt to unbreak the build. It turns out that marking them as unuspported whenever we're on OS X is way too coarse grained. This commit marks the tests as XFAIL with more granularity. llvm-svn: 347585
* [NFC] Rename lit feature to '-fsized-deallocation' for consistencyLouis Dionne2018-11-212-2/+2
| | | | | | | The '-faligned-allocation' flag uses a feature with the same name (with a leading dash). llvm-svn: 347367
* [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
* [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
* 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
* 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
* [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] Change comments to say C++ instead of c++. NFC.Stephan T. Lavavej2017-07-292-4/+4
| | | | | | | | 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
* 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
* 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
* 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-0410-3/+68
| | | | | | | | | | | | | | | 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
* Fix test failures caused by new/delete calls getting optimized awayEric Fiselier2017-03-025-5/+13
| | | | llvm-svn: 296813
* Rename new_handler in tests to avoid conflicts with MSVC symbols.Eric Fiselier2017-01-177-14/+14
| | | | | | | On Windows the header new.h defines "new_handler" in the global namespace. llvm-svn: 292177
* Fix unused parameters and variablesEric Fiselier2016-12-234-4/+4
| | | | llvm-svn: 290459
* Fix more uses of dynamic exception specifications in C++17Eric Fiselier2016-12-1118-44/+79
| | | | llvm-svn: 289356
* Remove spurious token from #endifRoger Ferrer Ibanez2016-11-021-1/+1
| | | | llvm-svn: 285792
* Protect tests for new/delete under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-024-5/+20
| | | | | | | | Skip the tests that expect an exception be thrown and protect unreachable catch blocks. Differential Revision: https://reviews.llvm.org/D26197 llvm-svn: 285791
* Attempt to workaround XPASS for aligned allocation testsEric Fiselier2016-10-204-4/+8
| | | | llvm-svn: 284691
OpenPOWER on IntegriCloud