| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] Remove unnecessary main() function in .compile.pass.cpp and .verify.cpp tests We pretty consistently don't define those cause they are not needed, and it removes the potential pitfall to think that these tests are being run. This doesn't touch .compile.fail.cpp tests since those should be replaced by .verify.cpp tests anyway, and there would be a lot to fix up. As a fly-by, I also fixed a bit of formatting, removed a few unused includes and made some very minor, clearly NFC refactorings such as in allocator.traits/allocator.traits.members/allocate.verify.cpp where the old test basically made no sense the way it was written. Differential Revision: https://reviews.llvm.org/D146236 | 3 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 | |
[libc++] Fix UB in <expected> related to "has value" flag (#68552) (#68733) The calls to std::construct_at might overwrite the previously set __has_value_ flag in the case where the flag is overlapping with the actual value or error being stored (since we use [[no_unique_address]]). To fix this issue, this patch ensures that we initialize the __has_value_ flag after we call std::construct_at. Fixes #68552 (cherry picked from commit 134c91595568ea1335b22e559f20c1a488ea270e) | 2 年前 | |
[libc++] Add missing 'return 0' from main functions in tests | 3 年前 | |
[libc++][format] Fixes out of bounds access. Fixes https://llvm.org/PR65011 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D158940 (cherry picked from commit 8930d04d5580c6a2cf04545c87387cd150cd7b46) | 2 年前 | |
[libcxx] Fix copy_move.pass test When LLVM is built under MSVC and libcxx ABI is set to 2, the 'copy_move.pass' test will unexpectedly pass. This patch mitigate this issue by setting this test will only expecting FAIL when libcxx ABI version is set to 1. This is a re-land of be9f55f4fff47badcdca17be5bcc0a4a15894739 Differential Revision: https://reviews.llvm.org/D155760 Fixes: https://github.com/llvm/llvm-project/issues/63442 | 2 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 | |
[libc++][LWG 2996] Implement c++20 shared_ptr rvalue overloads. Implement c++20 shared_ptr rvalue overloads for aliasing constructor and pointer casts. See https://cplusplus.github.io/LWG/issue2996 Commit from "patedeev" <dkp10000@gmail.com> Reviewed By: philnik, #libc, ldionne, pateldeev Differential Revision: https://reviews.llvm.org/D135548 | 2 年前 | |
[libc++] Fix problems with GCC 13 and switch to it in the CI Reviewed By: #libc, #libc_abi, Mordante Spies: arphaman, Mordante, libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D157060 | 2 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 | |
[libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markup By renaming .fail.cpp tests that don't need clang-verify to .compile.fail.cpp, the new test format will not try to compile these tests with clang-verify, and the old test format will work just the same. However, this allows removing a workaround that requires parsing each test looking for clang-verify markup. After this change, a .fail.cpp test should always have clang-verify markup. When clang-verify is not supported by the compiler, we will just check that these tests fail to compile. When clang-verify is supported, these tests will be compiled with clang-verify whether they have markup or not (so they should have markup, or they will fail). This simplifies the test suite and also ensures that all of our .fail.cpp tests provide clang-verify markup. If it's impossible for a test to have clang-verify markup, it can be moved to a .compile.fail.cpp test, which are unconditionally just checked for compilation failure. | 6 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 | |
[libc++] Increase the constexpr steps limit on some bitset tests. Prevent these tests from failing on some platforms (the number of constexpr steps increased by https://reviews.llvm.org/D154860). (cherry picked from commit 91876eab93a9f0ef29a339ed99bdb1c8ed1e85c6) | 2 年前 | |
[libc++][NFC] Move several .fail.cpp tests to .verify.cpp A few tests were also straightforward to translate to SFINAE tests instead, so in a few cases I did that and removed the .fail.cpp test entirely. Differential Revision: https://reviews.llvm.org/D153149 | 3 年前 | |
[libc++] Implement operator<=> for type_index Implements part of P1614R2 "The Mothership has Landed" Differential Revision: https://reviews.llvm.org/D131357 | 3 年前 | |
Support tests in freestanding 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 | 7 年前 | |
[libc++] Remove useless nothing_to_do.pass.cpp tests The testing script used to test libc++ historically did not like directories without any testing files, so these tests had been added. Since this is not necessary anymore, we can now remove these files. This has the benefit that the total number of tests reflects the real number of tests more closely, and we also skip some unnecessary work (especially relevant when running tests over SSH). However, some nothing_to_do.pass.cpp tests actually serve the purpose of documenting that an area of the Standard doesn't need to be tested, or is tested elsewhere. These files are not removed by this commit. Removal done with: import os import itertools for (dirpath, dirnames, filenames) in itertools.chain(os.walk('./libcxx/test'), os.walk('./libcxxabi/test')): if len(filenames + dirnames) > 1 and \ any(p == 'nothing_to_do.pass.cpp' for p in filenames): os.remove(os.path.join(dirpath, 'nothing_to_do.pass.cpp')) | 6 年前 | |
[libc++] Fix std::pair's pair-like constructor's incorrect assumption (#66585) The helper function __pair_like_explicit_wknd is only SFINAE-ed with tuple_size<remove_cvref_t<_PairLike>>::value == 2, but its function body assumes std::get being valid. Fixes #65620 (cherry picked from commit 054f9c55c6b4520d3feb8b4354b9b942026b5124) | 2 年前 | |
[libc++] Move all the remaining .fail.cpp tests to .verify.cpp I made sure they all had some expected-error output in them. Many of these tests would be better implemented as a positive test using SFINAE, but this is beyond the scope of this patch. Differential Revision: https://reviews.llvm.org/D153980 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 3 年前 |