[libc-commits] [libc] [libc] Make the sys/time.h timer macros single statements (PR #236519)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Thu Oct 29 08:49:26 PDT 2026


================
@@ -54,6 +54,21 @@ add_libc_test(
     -Wno-gnu-statement-expression-from-macro-expansion
 )
 
+if(LIBC_TARGET_OS_IS_LINUX)
+  add_libc_test(
+    sys_time_macros_test
+    SUITE
+      libc-include-tests
+    SRCS
+      sys_time_macros_test.cpp
+    DEPENDS
+      libc.hdr.types.struct_timeval
+      libc.hdr.types.suseconds_t
+      libc.hdr.types.time_t
----------------
vonosmas wrote:

You shouldn't depend on proxy headers in the include-test, since you're testing our own headers/types, you should use them directly as well.

https://github.com/llvm/llvm-project/pull/236519


More information about the libc-commits mailing list