[libc-commits] [libc] [libc] implement stdc_leading_zeros_u* for stdbit.h (PR #79669)

via libc-commits libc-commits at lists.llvm.org
Fri Jan 26 16:16:19 PST 2024


================
@@ -14,3 +14,22 @@ add_libc_test(
     # This is needed because the __containerof macro uses statement expression.
     -Wno-gnu-statement-expression-from-macro-expansion
 )
+
+add_libc_test(
+  stdbit_test
+  SUITE
+    libc_include_tests
+  SRCS
+    stdbit_test.cpp
+  DEPENDS
+    libc.__support.CPP.limits
+    libc.include.llvm-libc-macros.stdbit_macros
+    libc.src.stdbit.stdc_leading_zeros_uc
+    libc.src.stdbit.stdc_leading_zeros_ui
+    libc.src.stdbit.stdc_leading_zeros_ul
+    libc.src.stdbit.stdc_leading_zeros_ull
+    libc.src.stdbit.stdc_leading_zeros_us
+  COMPILE_OPTIONS
+    # stdbit is full of type generic macros implemented via C11 _Generic.
----------------
michaelrj-google wrote:

if you are using C11 features then why is the flag `-Wno-c11-extensions`? This comment may need some more detail.

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


More information about the libc-commits mailing list