| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] [test] Cleanup compile-only tests (#94121) I noticed that these tests had empty main functions. Dropping them and renaming the tests to MEOW.compile.pass.cpp will slightly improve test throughput. | 2 年前 | |
[clang] Preserve Qualifiers and type sugar in TemplateNames (#93433) This patch improves the preservation of qualifiers and loss of type sugar in TemplateNames. This problem is analogous to https://reviews.llvm.org/D112374 and this patch takes a very similar approach to that patch, except the impact here is much lesser. When a TemplateName was written bare, without qualifications, we wouldn't produce a QualifiedTemplate which could be used to disambiguate it from a Canonical TemplateName. This had effects in the TemplateName printer, which had workarounds to deal with this, and wouldn't print the TemplateName as-written in most situations. There are also some related fixes to help preserve this type sugar along the way into diagnostics, so that this patch can be properly tested. - Fix dropping the template keyword. - Fix type deduction to preserve sugar in TST TemplateNames. | 2 年前 | |
[libc++] Enable [[nodiscard]] extensions by default Adding [[nodiscard]] to functions is a conforming extension and done extensively in the MSVC STL. Reviewed By: ldionne, EricWF, #libc Spies: #libc_vendors, cjdb, mgrang, jloser, libcxx-commits Differential Revision: https://reviews.llvm.org/D128267 | 3 年前 | |
[libc++] Make test_allocator constexpr-friendly for constexpr string/vector Make test_allocator etc. constexpr-friendly so they can be used to test constexpr string and possibly constexpr vector Reviewed By: Quuxplusone, #libc, ldionne Differential Revision: https://reviews.llvm.org/D110994 | 4 年前 | |
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++][spaceship] Implements X::iterator container requirements. (#99343) This implements the requirements for the container iterator requirements for array, deque, vector, and vector<bool>. Implements: - LWG3352 strong_equality isn't a thing Implements parts of: - P1614R2 The Mothership has Landed Fixes: https://github.com/llvm/llvm-project/issues/62486 | 2 年前 | |
[clang] Preserve Qualifiers and type sugar in TemplateNames (#93433) This patch improves the preservation of qualifiers and loss of type sugar in TemplateNames. This problem is analogous to https://reviews.llvm.org/D112374 and this patch takes a very similar approach to that patch, except the impact here is much lesser. When a TemplateName was written bare, without qualifications, we wouldn't produce a QualifiedTemplate which could be used to disambiguate it from a Canonical TemplateName. This had effects in the TemplateName printer, which had workarounds to deal with this, and wouldn't print the TemplateName as-written in most situations. There are also some related fixes to help preserve this type sugar along the way into diagnostics, so that this patch can be properly tested. - Fix dropping the template keyword. - Fix type deduction to preserve sugar in TST TemplateNames. | 2 年前 | |
[libc++] Fix rejects-valid in std::span copy construction (#104500) Trying to copy-construct a std::span from another std::span holding an incomplete type would fail as we evaluate the SFINAE for the range-based constructor. The problem was that we checked for __is_std_span after checking for the range being a contiguous_range, which hard-errored because of arithmetic on a pointer to incomplete type. As a drive-by, refactor the whole test and format it. Fixes #104496 (cherry picked from commit 99696b35bc8a0054e0b0c1a26e8dd5049fa8c41b) | 1 年前 | |
[libc++] NFC: Normalize #endif // comment indentation | 5 年前 | |
[libc++] NFC: Normalize #endif // comment indentation | 5 年前 | |
[libc++] NFC: Normalize #endif // comment indentation | 5 年前 | |
[libc++] Qualifies size_t. This has been done using the following command find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)size_t)|\1std::\2|' \{} \; And manually removed some false positives in std/depr/depr.c.headers. The std module doesn't export ::size_t, this is a preparation for that module. Reviewed By: ldionne, #libc, EricWF, philnik Differential Revision: https://reviews.llvm.org/D146088 | 3 年前 | |
[libc++] Fix an exception safety issue in forward_list and add tests. When inserting nodes into a forward list, each new node is allocated but not constructed. The constructor was being called explicitly on the node value_ but the next_ pointer remained uninitialized rather than being set to null. This bug is only triggered in the cleanup code if an exception is thrown -- upon successful creation of new nodes, the last incorrect "next" value is overwritten to a correct pointer. This issue was found due to new tests added in https://reviews.llvm.org/D149830. Differential Revision: https://reviews.llvm.org/D152327 | 3 年前 | |
[libc++][test] Fix assumptions that std::array iterators are pointers (#74430) Found while running libc++'s tests with MSVC's STL, where std::array iterators are never pointers. Most of these changes are reasonably self-explanatory (the std::arrays are right there, and the sometimes-slightly-wrapped raw pointer types are a short distance away). A couple of changes are less obvious: In libcxx/test/std/containers/from_range_helpers.h, wrap_input() is called with Iter types that are constructible from raw pointers. It's also sometimes called with an array as the input, so the first overload was implicitly assuming that array iterators are pointers. We can fix this assumption by providing a dedicated overload for array, just like the one for vector immediately below. Finally, from_range_helpers.h should explicitly include both <array> and <vector>, even though they were apparently being dragged in already. In libcxx/test/std/containers/views/views.span/span.cons/iterator_sentinel.pass.cpp, fix throw_operator_minus. The error was pretty complicated, caused by the concepts machinery noticing that value_type and element_type were inconsistent. In the template instantiation context, you can see the critical detail that throw_operator_minus<std::_Array_iterator> is being formed. Fortunately, the fix is extremely simple. To produce element_type (which retains any cv-qualification, unlike value_type), we shouldn't attempt to remove_pointer with the iterator type It. Instead, we've already obtained the reference type, so we can remove_reference_t. (This is modern code, where we have access to the alias templates, so I saw no reason to use the older verbose form.) | 2 年前 | |
[libc++][ranges] Implement the changes to node-based containers from P1206 ( ranges::to): - add the from_range_t constructors and the related deduction guides; - add the insert_range/assign_range/etc. member functions. (Note: this patch is split from https://reviews.llvm.org/D142335) Differential Revision: https://reviews.llvm.org/D149830 | 3 年前 | |
[libc++][ranges] Implement the changes to node-based containers from P1206 ( ranges::to): - add the from_range_t constructors and the related deduction guides; - add the insert_range/assign_range/etc. member functions. (Note: this patch is split from https://reviews.llvm.org/D142335) Differential Revision: https://reviews.llvm.org/D149830 | 3 年前 | |
[libc++] Deprecates rel_ops. (#91642) These operators were deprecated in P0768R1 Library Support for the Spaceship (Comparison) Operator This was discovered while investigating the paper's implementation status. | 2 年前 | |
[libc++][NFC] Consistently use newline between license and include guard | 3 年前 | |
[libc++][NFC] Consistently use newline between license and include guard | 3 年前 | |
[libc++] [test] Update "test_compare.h" users to avoid removed-in-C++20 members. NFCI. Drive-by minor improvements to a couple of uses of min_pointer. Differential Revision: https://reviews.llvm.org/D103366 | 5 年前 | |
[libc++] [test] No longer rely on std::hash<T>::argument_type. Differential Revision: https://reviews.llvm.org/D104166 | 5 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 |