summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat
Commit message (Collapse)AuthorAgeFilesLines
* Make rvalue metaprogramming traits work in C++03.Eric Fiselier2019-06-213-6/+0
| | | | | | The next step is to get move and forward working in C++03. llvm-svn: 364053
* Add include for 'test_macros.h' to all the tests that were missing them. ↵Marshall Clow2019-05-311-0/+2
| | | | | | Thanks to Zoe for the (big, but simple) patch. NFC intended. llvm-svn: 362252
* [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdefLouis Dionne2019-02-051-7/+2
| | | | | | | | | | | When the whole test only works starting at some version of the Standard, use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides more visibility into the test suite. Reviewed as https://reviews.llvm.org/D57704. Thanks to Andrey Maksimov for the patch. llvm-svn: 353206
* Support tests in freestandingJF Bastien2019-02-0429-30/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1929-116/+87
| | | | | | | | | | | | | | | | | | 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
* Second part of P0482 - char8_t. Reviewed as https://reviews.llvm.org/D55308Marshall Clow2018-12-111-1/+1
| | | | llvm-svn: 348828
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-291-0/+3
| | | | | | numeric_limits<char8_t> is valid and sane. (second try) llvm-svn: 347930
* Revert commit r347904 because it broke older compilersMarshall Clow2018-11-291-3/+0
| | | | llvm-svn: 347908
* First part of P0482 - Establish that char8_t is an integral type, and that ↵Marshall Clow2018-11-291-0/+3
| | | | | | numeric_limits<char8_t> is valid and sane. llvm-svn: 347904
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-291-5/+5
| | | | llvm-svn: 309464
* Fix two test failures caused by Windows mangling of function types.Eric Fiselier2017-05-072-15/+21
| | | | | | | | | | | | On Windows the function template `template <class T> void test()` has the same mangled name when instantiated with the distinct types `void()` and `void() noexcept`. When this occurs Clang emits an error. This error was causing two type-traits tests to fail. However this can be worked around by using class templates instead of function templates, which is what this patch does to fix the errors. llvm-svn: 302380
* Add tests for noexcept functionsEric Fiselier2017-02-133-93/+190
| | | | llvm-svn: 294995
* [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.Stephan T. Lavavej2016-11-042-2/+6
| | | | | | | | | | | This replaces every occurrence of _LIBCPP_STD_VER in the tests with TEST_STD_VER. Additionally, for every affected file, #include "test_macros.h" is being added explicitly if it wasn't already there. https://reviews.llvm.org/D26294 llvm-svn: 286007
* Remove all instances of _LIBCPP_HAS_NO_RVALUE_REFERENCES from test/std/utilitiesEric Fiselier2016-10-011-2/+2
| | | | llvm-svn: 283032
* Add more tests for LWG#2582. No code changes needed, just tests.Marshall Clow2016-07-1216-18/+20
| | | | llvm-svn: 275211
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-012-2/+2
| | | | llvm-svn: 271435
* Added tests to make sure that the categorization traits work on incomplete typesMarshall Clow2016-02-2529-15/+127
| | | | llvm-svn: 261925
* Walter pointed out some missing includes in the tests. Fixing the includes ↵Marshall Clow2015-11-1015-0/+15
| | | | | | uncovered a couple bugs in the _v type traits. Fixed those, too llvm-svn: 252612
* Implement the first part of P0006R0: Adopt Type Traits Variable Templates ↵Marshall Clow2015-11-0114-0/+1332
| | | | | | for C++17. Significantly augment the existing tests. llvm-svn: 251766
* Refactor is_member_function_pointer to use is_function and not ↵Eric Fiselier2015-06-131-13/+47
| | | | | | | | | | __member_function_traits. Replacing the dependancy on __member_function_traits with is_function allows is_member_function_pointer to work more often. In particular it allows it to work when we don't have variadic templates but the function has an arity > 3. llvm-svn: 239649
* [libc++] Fix PR20084 - std::is_function<void() const> failed.Eric Fiselier2015-02-181-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces some black magic to detect const and volatile qualified function types such as `void () const`. The patch works in the following way: We first rule out any type that satisfies on of the following. These restrictions are important so that the test below works properly. * `is_class<_Tp>::value` * `is_union<_Tp>::value` * `is_void<_Tp>::value` * `is_reference<_Tp>::value` * `__is_nullptr_t<_Tp>::value` If none of the above is true we perform overload resolution on `__source<_Tp>(0)` to determine the return type. * If `_Tp&` is well-formed we select `_Tp& __source(int)`. `_Tp&` is only ill formed for cv void types and cv/ref qualified function types. * Otherwise we select `__dummy_type __source(...)`. Since we know `_Tp` cannot be void then it must be a function type. let `R` be the returned from `__source<_Tp>(0)`. We perform overload resolution on `__test<_Tp>(R)`. * If `R` is `__dummy_type` we call `true_type __test(__dummy_type)`. * if `R` is `_Tp&` and `_Tp&` decays to `_Tp*` we call `true_type __test(_Tp*)`. Only references to function types decay to a pointer of the same type. * In all other cases we call `false_type __test(...)`. `__source<_Tp>(0)` will try and form `_Tp&` in the return type. if `_Tp&` is not well formed the return type of `__source<_Tp>(0)` will be dummy type. `_Tp&` is only ill-formed for cv/ref qualified function types (and void which is dealt with elsewhere). This fixes PR20084 - http://llvm.org/bugs/show_bug.cgi?id=20084 Reviewers: rsmith, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7573 llvm-svn: 229696
* Get tests running with warnings. Fix warnings in headers and testsEric Fiselier2015-02-051-2/+0
| | | | llvm-svn: 228344
* Move test into test/std subdirectory.Eric Fiselier2014-12-2015-0/+852
llvm-svn: 224658
OpenPOWER on IntegriCloud