[libc-commits] [libc] 3f81126 - [libc][NFC] add missing static qualifiers in tests
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Thu Oct 20 01:53:42 PDT 2022
Author: Guillaume Chatelet
Date: 2022-10-20T08:52:56Z
New Revision: 3f81126a338796427a364719f19076d1a37e4b25
URL: https://github.com/llvm/llvm-project/commit/3f81126a338796427a364719f19076d1a37e4b25
DIFF: https://github.com/llvm/llvm-project/commit/3f81126a338796427a364719f19076d1a37e4b25.diff
LOG: [libc][NFC] add missing static qualifiers in tests
Added:
Modified:
libc/test/src/string/memory_utils/elements_test.cpp
libc/test/src/string/memory_utils/memory_access_test.cpp
Removed:
################################################################################
diff --git a/libc/test/src/string/memory_utils/elements_test.cpp b/libc/test/src/string/memory_utils/elements_test.cpp
index 218700137c11..d1128440622c 100644
--- a/libc/test/src/string/memory_utils/elements_test.cpp
+++ b/libc/test/src/string/memory_utils/elements_test.cpp
@@ -42,7 +42,7 @@ using FixedSizeTypes = testing::TypeList<
builtin::_8 //
>;
-char GetRandomChar() {
+static char GetRandomChar() {
static constexpr const uint64_t a = 1103515245;
static constexpr const uint64_t c = 12345;
static constexpr const uint64_t m = 1ULL << 31;
@@ -51,7 +51,7 @@ char GetRandomChar() {
return seed;
}
-void Randomize(cpp::span<char> buffer) {
+static void Randomize(cpp::span<char> buffer) {
for (auto ¤t : buffer)
current = GetRandomChar();
}
diff --git a/libc/test/src/string/memory_utils/memory_access_test.cpp b/libc/test/src/string/memory_utils/memory_access_test.cpp
index 252cb6e518ef..a9eb1f8b2011 100644
--- a/libc/test/src/string/memory_utils/memory_access_test.cpp
+++ b/libc/test/src/string/memory_utils/memory_access_test.cpp
@@ -69,7 +69,7 @@ struct MemoryAccessObserver {
Buffer Buffer2;
};
-MemoryAccessObserver Observer;
+static MemoryAccessObserver Observer;
template <size_t Size> struct TestingElement {
static constexpr size_t SIZE = Size;
More information about the libc-commits
mailing list