10 Commits

Author SHA1 Message Date
Nikolas Klauser
78636be4d6
[libc++] Move more tests into test/extensions (#152975)
This should be the last set of tests moved to `test/extensions` for now.
2025-08-13 10:14:24 +02:00
Nikolas Klauser
6b371cab94
[libc++] Move a bunch of extensions tests to test/extensions (#149275) 2025-07-19 09:44:25 +02:00
Nikolas Klauser
be3d614cc1
[libc++] Fix hash_multi{map,set}::insert (#149290) 2025-07-17 23:23:04 +02:00
Nikolas Klauser
4695aea28e
[libc++] Move more tests into better places (#148419) 2025-07-17 11:12:01 +02:00
Nikolas Klauser
cee679aa3f
[libc++] Always initialize __tree::{,const_}iterator (#147167)
This was probably added to support https://wg21.link/n3644 but there's
no reason not to initialize the pointer in all standard modes. This is
technically an extension since n3644 only required value-initialized
iterators to be comparable, but supporting this as an extension should
be uncontroversial since it avoids potential reads of uninitialized
memory in C++03/C++11 without doing any harm.
2025-07-16 10:01:32 +02:00
Nikolas Klauser
03f6f48b73
[libc++] Move a few tests into more correct places (#147557) 2025-07-10 20:55:07 +02:00
Nikolas Klauser
e9805235bf
[libc++] Move libcxx/test/libcxx/extensions to libcxx/test/extensions and update the tests (#145476)
This patch adds a separate `extensions` directory, since there are quite
a few extensions in libc++ that aren't necessarily libc++-specific. For
example, the tests currently in `libcxx/test/libcxx/extensions` should
also pass with libstdc++, since they originally added the extension.
This also "documents" what users are allowed to rely on and what parts
are just libc++ tests to make sure our implementation is behaving as we
expect, which may be subject to change.

This patch also formats the tests and refactors `.fail.cpp` tests to
`.verify.cpp` tests.
2025-06-27 13:16:37 +02:00
Eric Fiselier
5a83710e37 Move test into test/std subdirectory.
llvm-svn: 224658
2014-12-20 01:40:03 +00:00
Peter Collingbourne
8845dbd798 Do not derive __gnu_cxx::hash<T> from std::hash<T>.
Instead, define explicit specializations for the basic types listed in
the SGI documentation. This solves two problems:

 1) Helps avoid silent ODR violations caused by the absence of a
    user-supplied __gnu_cxx::hash specialization in cases where a std::hash
    specialization exists (e.g. for std::string).

 2) __gnu_cxx::hash semantics are slightly different to those of
    std::hash (for example, the former may dereference a pointer argument)
    so it is inappropriate for __gnu_cxx::hash to receive std::hash
    specializations by default.

Differential Revision: http://llvm-reviews.chandlerc.com/D2747

llvm-svn: 203070
2014-03-06 04:11:10 +00:00
Peter Collingbourne
99aadbdb7d [libc++] Const qualify __gnu_cxx::hash_map<>::const_iterator::pointer type.
Differential Revision: http://llvm-reviews.chandlerc.com/D2811

llvm-svn: 202749
2014-03-03 19:50:01 +00:00