[libc-commits] [libc] [libc] lfind_test.cpp: put helpers in an anonymous namespace. (PR #137821)

via libc-commits libc-commits at lists.llvm.org
Tue Apr 29 08:28:41 PDT 2025


================
@@ -9,10 +9,14 @@
 #include "src/search/lfind.h"
 #include "test/UnitTest/Test.h"
 
+namespace {
+
 int compar(const void *a, const void *b) {
   return *reinterpret_cast<const int *>(a) != *reinterpret_cast<const int *>(b);
 }
 
+}
+
----------------
enh-google wrote:

yeah, i'd have just used static myself but other llvm-libc tests seemed to have an anonymous namespace...

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


More information about the libc-commits mailing list