14 Commits

Author SHA1 Message Date
William Huynh
33fe6353ef
Revert "[libc] Add -Wextra for libc tests" (#153169)
Reverts llvm/llvm-project#133643
2025-08-12 11:40:14 +00:00
Vinay Deshmukh
e617dc80bf
[libc] Add -Wextra for libc tests (#133643)
* Relates to: https://github.com/llvm/llvm-project/issues/119281
2025-08-12 12:27:13 +01:00
Nick Desaulniers
e566313a1f
[libc][signal] clean up usage of sighandler_t (#125745)
`man 3 signal`'s declaration has a face _only a mother could love_.

sighandler_t and __sighandler_t are not defined in the C standard, or POSIX.

They are helpful typedefs provided by glibc and the Linux kernel UAPI headers
respectively since working with function pointers' syntax can be painful. But
we should not rely on them; in C++ we have `auto*` and `using` statements.

Remove the proxy header, and only include a typedef for sighandler_t when
targeting Linux, for compatibility with glibc.

Fixes: #125598
2025-02-07 10:43:56 -08:00
Nick Desaulniers
9426fdd4cb
[libc][test] fix memory leak pt.2 (#122384)
These were created with operator new (see `Test::createCallable`), so operator
delete should be used instead of free().

Fixes: #122369
Fixes: #122378
2025-01-09 14:46:52 -08:00
Nick Desaulniers
3caa68a021
[libc][test] fix memory leak (#122378)
Looks like the smart pointer I removed was being used to free the underlying
object.

Fixes: #122369
2025-01-09 14:15:31 -08:00
Nick Desaulniers
0efb376c20
[libc][test] remove C++ stdlib includes (#122369)
These make cross compiling the test suite more difficult, as you need
the
sysroot to contain these headers and libraries cross compiled for your
target.
It's straightforward to stick with the corresponding C headers.
2025-01-09 13:40:54 -08:00
Petr Hosek
5ff3ff33ff
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)
This is a part of #97655.
2024-07-12 09:28:41 -07:00
Mehdi Amini
ce9035f5bd
Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)
Reverts llvm/llvm-project#98075

bots are broken
2024-07-12 09:12:13 +02:00
Petr Hosek
3f30effe1b
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)
This is a part of #97655.
2024-07-11 12:35:22 -07:00
Roland McGrath
d2be9826dd
[libc] Clean up alternate test framework support (#89659)
This replaces the old macros LIBC_COPT_TEST_USE_FUCHSIA and
LIBC_COPT_TEST_USE_PIGWEED with LIBC_COPT_TEST_ZXTEST and
LIBC_COPT_TEST_GTEST, respectively.  These are really not about
whether the code is in the Fuchsia build or in the Pigweed build,
but just about what test framework is being used.  The gtest
framework can be used in many contexts, and the zxtest framework
is not always what's used in the Fuchsia build.

The test/UnitTest/Test.h wrapper header now provides the macro
LIBC_TEST_HAS_MATCHERS() for use in `#if` conditionals on use of
gmock-style matchers, replacing `#if` conditionals that test the
framework selection macros directly.
2024-04-22 15:18:02 -07:00
Job Henandez Lara
75bbf4dd7c
[libc] Add proxy headers for fenv types. (#88467)
Fixes #88187
2024-04-15 11:45:16 -07:00
Guillaume Chatelet
b6bc9d72f6
[libc] Mass replace enclosing namespace (#67032)
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-09-26 11:45:04 +02:00
Guillaume Chatelet
0fd0b74289 [libc][NFC] Clean up matchers namespace
This is a follow up to https://reviews.llvm.org/D152503

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152533
2023-06-10 06:55:16 +00:00
Siva Chandra Reddy
af1315c28f [libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.
This part of the effort to make all test related pieces into the `test`
directory. This helps is excluding test related pieces in a straight
forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move
the MPFR wrapper and testutils into the 'test' directory.
2023-02-07 19:45:51 +00:00