summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/experimental/memory
Commit message (Collapse)AuthorAgeFilesLines
* libcxx: Rename .hpp files in libcxx/test/support to .hNico Weber2019-08-2127-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add include for 'test_macros.h' to all the tests that were missing them. ↵Marshall Clow2019-05-3133-0/+66
| | | | | | Thanks to Zoe for the (big, but simple) patch. NFC intended. llvm-svn: 362252
* [libc++] Mark several tests as XFAIL on macosx10.7Louis Dionne2019-02-271-0/+4
| | | | | | | | | | | | | | | Those tests fail when linking against a new dylib but running against macosx10.7. I believe this is caused by a duplicate definition of the RTTI for exception classes in libc++.dylib and libc++abi.dylib, but this matter still needs some investigation. This issue was not caught previously because all the tests always linked against the same dylib used for running (because LIT made it impossible to do otherwise before r349171). rdar://problem/46809586 llvm-svn: 354940
* [libcxx] Make sure all experimental tests are disabled when ↵Louis Dionne2019-02-2328-28/+0
| | | | | | | | | | | | | | | | enable_experimental=False Summary: Previously, we'd run some experimental tests even when enable_experimental=False was used with lit. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits, mclow.lists Differential Revision: https://reviews.llvm.org/D55834 llvm-svn: 354725
* Support tests in freestandingJF Bastien2019-02-0451-51/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1951-204/+153
| | | | | | | | | | | | | | | | | | 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
* Mark the test using <experimental/memory_resource> to require c++experimental.Volodymyr Sapsai2018-06-111-0/+1
| | | | | | | | | | | | | | | | | When built against the old libc++ version the test was causing linker error Undefined symbols for architecture x86_64: "std::experimental::fundamentals_v1::pmr::new_delete_resource()", referenced from: void test_evil<WidgetV0, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV0, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV0, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV0, WidgetV3>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV1, WidgetV0>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV1, WidgetV1>() in construct_piecewise_pair_evil.pass.cpp.o void test_evil<WidgetV1, WidgetV2>() in construct_piecewise_pair_evil.pass.cpp.o ... llvm-svn: 334431
* LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()"Eric Fiselier2018-05-296-17/+300
| | | | | | | | | | | | | | | | | | | Patch from Arthur O'Dwyer. In the TS, `uses_allocator` construction for `pair` tried to use an allocator type of `memory_resource*`, which is incorrect because `memory_resource*` is not an allocator type. LWG 2969 fixed it to use `polymorphic_allocator` as the allocator type instead. https://wg21.link/lwg2969 (D47090 included this in `<memory_resource>`; at Eric's request, I've split this out into its own patch applied to the existing `<experimental/memory_resource>` instead.) Reviewed as https://reviews.llvm.org/D47109 llvm-svn: 333384
* [libcxx] [test] Make files consistently end with newlines, NFC.Stephan T. Lavavej2017-07-291-1/+1
| | | | llvm-svn: 309465
* [libcxx] [test] Fix comment typos, strip trailing whitespace.Stephan T. Lavavej2017-01-181-1/+1
| | | | | | No functional change, no code review. llvm-svn: 292434
* Refactor uses_allocator test types for upcoming fixesEric Fiselier2016-12-095-0/+23
| | | | llvm-svn: 289197
* Enable warnings by default for C++ >= 11 and fix -Wshadow occurancesEric Fiselier2016-12-031-2/+2
| | | | llvm-svn: 288557
* Implement p0337r0. Delete operator= for polymorphic_allocator.Eric Fiselier2016-06-271-2/+2
| | | | llvm-svn: 273838
* Found a couple bugs in the test suite. No functionality change.Marshall Clow2016-06-141-2/+2
| | | | llvm-svn: 272679
* Add `REQUIRES: c++experimental` where appropriate.Dan Albert2016-06-1027-0/+27
| | | | | | | | | | | | | | Summary: I haven't added it to all the tests, just those that fail without it (those that aren't header only). Reviewers: EricWF, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21247 llvm-svn: 272443
* Fix bug in test allocator that incorrectly computed the allocation sizeEric Fiselier2016-05-301-1/+1
| | | | llvm-svn: 271195
* Add experimental container alias templates for PMRsEric Fiselier2016-05-0710-0/+576
| | | | llvm-svn: 268841
* Add <experimental/memory_resource>Eric Fiselier2016-05-0740-0/+2732
Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20007 llvm-svn: 268829
OpenPOWER on IntegriCloud