[libc-commits] [libc] 0e9fb52 - [libc] lsearch_test.cpp: put helpers in anonymous namespace. (#137964)
via libc-commits
libc-commits at lists.llvm.org
Wed Apr 30 08:55:39 PDT 2025
Author: enh-google
Date: 2025-04-30T11:55:35-04:00
New Revision: 0e9fb5202ce2c1e3cc43436dd4c4b8cd57fa1cef
URL: https://github.com/llvm/llvm-project/commit/0e9fb5202ce2c1e3cc43436dd4c4b8cd57fa1cef
DIFF: https://github.com/llvm/llvm-project/commit/0e9fb5202ce2c1e3cc43436dd4c4b8cd57fa1cef.diff
LOG: [libc] lsearch_test.cpp: put helpers in anonymous namespace. (#137964)
Added:
Modified:
libc/test/src/search/lsearch_test.cpp
Removed:
################################################################################
diff --git a/libc/test/src/search/lsearch_test.cpp b/libc/test/src/search/lsearch_test.cpp
index 9e58b87772c3b..864e3ecc21a08 100644
--- a/libc/test/src/search/lsearch_test.cpp
+++ b/libc/test/src/search/lsearch_test.cpp
@@ -9,10 +9,14 @@
#include "src/search/lsearch.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(LlvmLibcLsearchTest, SearchHead) {
int list[3] = {1, 2, 3};
size_t len = 3;
More information about the libc-commits
mailing list