summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/iterators/predef.iterators
Commit message (Collapse)AuthorAgeFilesLines
* [libc++][NFC] Remove excess trailing newlines from most filesCasey Carter2019-10-231-1/+0
| | | | Testing git commit access.
* libcxx: Rename .hpp files in libcxx/test/support to .hNico Weber2019-08-2117-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."Eric Fiselier2019-08-041-41/+0
| | | | | | | | | Some modules builds are issuing buggy diagnostics. The cause of which is TBD. This reverts commit r@367770. llvm-svn: 367777
* Suppress -Wctad-maybe-unsupported on types w/o deduction guides.Eric Fiselier2019-08-031-0/+41
| | | | | | | | | | | There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
* Add include for 'test_macros.h' to all the tests that were missing them. ↵Marshall Clow2019-05-3124-0/+47
| | | | | | Thanks to Zoe for the (big, but simple) patch. NFC intended. llvm-svn: 362252
* Support tests in freestandingJF Bastien2019-02-0495-95/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1995-380/+285
| | | | | | | | | | | | | | | | | | 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
* Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed ↵Billy Robert O'Neal III2017-11-212-3/+4
| | | | | | as https://reviews.llvm.org/D40065 llvm-svn: 318804
* Tolerate [[nodiscard]] annotations in the STL. Reviewed as ↵Billy Robert O'Neal III2017-11-151-2/+2
| | | | | | https://reviews.llvm.org/D39033 llvm-svn: 318276
* Placate unused variable warnings uncovered by improvements to clang's ↵Benjamin Kramer2017-10-142-0/+4
| | | | | | -Wunused-variable llvm-svn: 315809
* [libcxx] [test] Change comments to say C++ instead of c++. NFC.Stephan T. Lavavej2017-07-2917-17/+17
| | | | | | | | This makes them consistent (many comments already used uppercase). The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this change. llvm-svn: 309468
* Clean up more usages of _LIBCPP_HAS_NO_RVALUE_REFERENCESEric Fiselier2017-03-033-18/+6
| | | | llvm-svn: 296854
* Fix unused warning which only triggers in C++11Eric Fiselier2016-12-241-0/+3
| | | | llvm-svn: 290475
* Enable warnings by default for C++ >= 11 and fix -Wshadow occurancesEric Fiselier2016-12-032-31/+26
| | | | llvm-svn: 288557
* [libcxx] [test] D27027: Strip trailing whitespace.Stephan T. Lavavej2016-11-231-1/+1
| | | | llvm-svn: 287829
* Implement another part of P0031; adding constexpr to move_iteratorMarshall Clow2016-11-0224-0/+349
| | | | llvm-svn: 285818
* Adding a missing constexpr test for reverse_iterator operator[].Marshall Clow2016-10-201-0/+11
| | | | llvm-svn: 284731
* Implement constexpr support for reverse_iterator. Reviewed as ↵Marshall Clow2016-10-1923-23/+366
| | | | | | https://reviews.llvm.org/D25534 llvm-svn: 284602
* Fix ::reference typedef in insert iterators.Eric Fiselier2016-06-303-6/+6
| | | | | | | | | | | | Since at least the C++11 standard insert iterators are specified as having ::reference typedef void. Libc++ was not doing that. This patch corrects the typedef. This patch changes the std::iterator base class of insert_iterator, front_insert_iterator and back_insert_iterator. This should not be an ABI breaking change. llvm-svn: 274209
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-011-3/+3
| | | | llvm-svn: 271435
* [libcxx] Improve tests to use the UNSUPPORTED lit directiveAsiri Rathnayake2016-05-281-5/+2
| | | | | | | | | | | | | | | | | | | Quite a few libcxx tests seem to follow the format: #if _LIBCPP_STD_VER > X // Do test. #else // Empty test. #endif We should instead use the UNSUPPORTED lit directive to exclude the test on earlier C++ standards. This gives us a more accurate number of test passes for those standards and avoids unnecessary conflicts with other lit directives on the same tests. Reviewers: bcraig, ericwf, mclow.lists Differential revision: http://reviews.llvm.org/D20730 llvm-svn: 271108
* Fix LWG issue #2106: move_iterators returning prvaluesEric Fiselier2016-04-221-1/+40
| | | | llvm-svn: 267091
* Implement LWG#680, which was missed lo these many moons ago, and was ↵Marshall Clow2016-04-111-2/+2
| | | | | | reported as bug #27259. As a drive-by fix, replace the hand-rolled equivalent to addressof in __wrap_iter with the real thing. llvm-svn: 265914
* One more #include request in the test suite from Walter BrownMarshall Clow2015-01-111-0/+1
| | | | llvm-svn: 225609
* Move test into test/std subdirectory.Eric Fiselier2014-12-2095-0/+3577
llvm-svn: 224658
OpenPOWER on IntegriCloud