summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Purge mentions of GCC 4 from the test suiteLouis Dionne2019-09-251-4/+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-251-0/+4
| | | | | | | | | | | | 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-241-4/+0
| | | | | | | We don't support GCC 4 and older according to the documentation, so we should pretend it doesn't exist. llvm-svn: 372787
* [libcxx] [test] Revert r356632 add (void) casts to operator new calls, to ↵Billy Robert O'Neal III2019-03-214-4/+4
| | | | | | 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-204-4/+4
| | | | | | | | generated by [[nodiscard]]. This allows these tests to pass when compiled by MSVC++. llvm-svn: 356632
* Support tests in freestandingJF Bastien2019-02-0417-17/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-204-12/+20
| | | | | | | | | | 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-204-12/+8
| | | | | | | | | 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-1917-68/+51
| | | | | | | | | | | | | | | | | | 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-194-8/+12
| | | | | | | | | | 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
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-071-5/+5
| | | | | | | 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-064-48/+48
| | | | | | Some people are still running the test suite using AppleClang 9. llvm-svn: 348507
* [libcxx] Fix XFAILs for aligned allocation testsLouis Dionne2018-11-264-66/+76
| | | | | | | | | | 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-211-1/+1
| | | | | | | 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-158-40/+85
| | | | | | | | | | | | | | | | | 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
* Use DoNotOptimize to prevent new/delete elision.Eric Fiselier2018-03-227-20/+29
| | | | | | | | | | | 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 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-044-0/+100
| | | | llvm-svn: 319711
* [test] Alignment must be > __STDCPP_DEFAULT_NEW_ALIGNMENT__ to call aligned newCasey Carter2017-11-155-5/+5
| | | | | | Differential Revision: D39221 llvm-svn: 318325
* Change test suite to support c++17 dialect flag instead of c++1z.Eric Fiselier2017-11-071-1/+1
| | | | | | | | 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-092-0/+2
| | | | | | | | | | | | | | | | | 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-291-2/+2
| | | | | | | | This makes them consistent (many comments already used uppercase). The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. llvm-svn: 309468
* Fix GCC 7 test failures.Eric Fiselier2017-05-095-5/+6
| | | | | | | | | | | 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-074-2/+23
| | | | | | | | | | | | | 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-045-1/+35
| | | | | | | | | | | | | | | 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-021-1/+3
| | | | llvm-svn: 296813
* Rename new_handler in tests to avoid conflicts with MSVC symbols.Eric Fiselier2017-01-173-6/+6
| | | | | | | On Windows the header new.h defines "new_handler" in the global namespace. llvm-svn: 292177
* Fix unused parameters and variablesEric Fiselier2016-12-232-2/+2
| | | | llvm-svn: 290459
* Fix more uses of dynamic exception specifications in C++17Eric Fiselier2016-12-119-22/+40
| | | | 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-022-2/+10
| | | | | | | | 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-202-2/+4
| | | | llvm-svn: 284691
* Prevent new/delete replacement tests from being optimized away.Eric Fiselier2016-10-143-17/+14
| | | | llvm-svn: 284289
* Clarify XFAIL commentsEric Fiselier2016-10-141-1/+2
| | | | llvm-svn: 284282
* XFAIL aligned allocation tests for older Clang versionsEric Fiselier2016-10-144-9/+14
| | | | llvm-svn: 284214
* XFAIL aligned allocation test failures with UBSANEric Fiselier2016-10-142-7/+7
| | | | llvm-svn: 284210
* Implement P0035R4 -- Add C++17 aligned allocation functionsEric Fiselier2016-10-145-0/+405
| | | | | | | | | | | | | | | | Summary: This patch implements the library side of P0035R4. The implementation is thanks to @rsmith. In addition to the C++17 implementation, the library implementation can be explicitly turned on using `-faligned-allocation` in all dialects. Reviewers: mclow.lists, rsmith Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D25591 llvm-svn: 284206
* Placate MSVC's unchecked malloc warnings.Eric Fiselier2016-06-222-2/+6
| | | | llvm-svn: 273374
* UBSan doesn't globally replace new/delete but it still makes some tests ↵Eric Fiselier2016-06-222-0/+8
| | | | | | fail. Investigation needed. llvm-svn: 273372
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-102-0/+2
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* Fix warnings in test/std/language.supportEric Fiselier2015-07-181-1/+2
| | | | llvm-svn: 242624
* Cleanup tests that fail in C++1z and with Clang 3.8Eric Fiselier2015-07-171-4/+3
| | | | llvm-svn: 242581
* Mark two tests as failing on clang 3.8 (they failed on 3.7, too)Marshall Clow2015-07-161-2/+2
| | | | llvm-svn: 242375
* Add TODO items and remove use of 'noexcept' in C++03 test.Eric Fiselier2015-06-021-1/+1
| | | | llvm-svn: 238802
* Address @danalberts comments on r237700Eric Fiselier2015-05-191-1/+1
| | | | llvm-svn: 237740
* Add compiler flag test support to LIT. Fix new/delete tests on apple-clang.Eric Fiselier2015-05-191-5/+2
| | | | llvm-svn: 237700
* mark new/delete tests as XFAIL more carefullyEric Fiselier2015-05-192-5/+10
| | | | llvm-svn: 237664
* [libcxx] Rework sized delete.Eric Fiselier2015-05-197-258/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch does 2 main things: 1. Enable sized delete if the feature test macro `__cpp_sized_deallocation` is enabled. 2. Rework and cleanup all of the sized delete tests. Test Plan: The sized delete replacement tests are now split into 4 files: 1. sized_delete11.pass.cpp: Ensure overriding sized delete in C++11 has no effect. 2. sized_delete14.pass.cpp: Test overriding sized delete in C++14 and ensure it is called. This test fails on clang and GCC < 5.1. 3. size_delete_calls_unsized_delete_.pass.cpp: Test that the default sized delete calls unsized delete. 4. sized_delete_fsizeddeallocation.pass.cpp: Test overriding sized delete when -fsized-deallocation is passed. This test should pass on clang and GCC >= 5.1 I have also removed a lot of cruft from the old tests. They no longer replace the new handler and tests that it is called for bad allocations. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9831 llvm-svn: 237662
* Fix for LWG Issue 2458: N3778 and new library deallocation signatures.Marshall Clow2015-05-181-109/+0
| | | | llvm-svn: 237592
* Remove statement with no effect inside tests.Eric Fiselier2015-04-011-1/+0
| | | | llvm-svn: 233816
OpenPOWER on IntegriCloud