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

via libc-commits libc-commits at lists.llvm.org
Tue Apr 29 15:17:02 PDT 2025


Author: enh-google
Date: 2025-04-29T18:16:59-04:00
New Revision: a24457eb99d5c78e46bdf5310430a9551e480361

URL: https://github.com/llvm/llvm-project/commit/a24457eb99d5c78e46bdf5310430a9551e480361
DIFF: https://github.com/llvm/llvm-project/commit/a24457eb99d5c78e46bdf5310430a9551e480361.diff

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

This matches other tests and allows the tests to be built together (as
Android is doing).

Added: 
    

Modified: 
    libc/test/src/search/lfind_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/search/lfind_test.cpp b/libc/test/src/search/lfind_test.cpp
index 00384f7eec14e..21f810a8a3acc 100644
--- a/libc/test/src/search/lfind_test.cpp
+++ b/libc/test/src/search/lfind_test.cpp
@@ -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);
 }
 
+} // namespace
+
 TEST(LlvmLibcLfindTest, SearchHead) {
   int list[3] = {1, 2, 3};
   size_t len = 3;


        


More information about the libc-commits mailing list