summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2023-05-11 08:27:42 -0700
committerCopybara-Service <copybara-worker@google.com>2023-05-11 08:28:20 -0700
commitbb2941fcc611b9e4eaf16f156e8c723348bf0931 (patch)
tree8eb795656bb1b823c950d244b6d27b4b5bc625e2
parentbc860af08783b8113005ca7697da5f5d49a8056f (diff)
downloadgoogletest-git-bb2941fcc611b9e4eaf16f156e8c723348bf0931.tar.gz
Give CreateArgvFromArgs internal linkage
It isn't declared in any header or referenced from any other file. PiperOrigin-RevId: 531209642 Change-Id: I9e7df37f737b00994f8845ed38c3b775879cb25c
-rw-r--r--googletest/src/gtest-death-test.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index c3b7820e..4cf78e71 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -625,9 +625,11 @@ bool DeathTestImpl::Passed(bool status_ok) {
return success;
}
+#ifndef GTEST_OS_WINDOWS
// Note: The return value points into args, so the return value's lifetime is
// bound to that of args.
-std::unique_ptr<char*[]> CreateArgvFromArgs(std::vector<std::string>& args) {
+static std::unique_ptr<char*[]> CreateArgvFromArgs(
+ std::vector<std::string>& args) {
auto result = std::make_unique<char*[]>(args.size() + 1);
for (size_t i = 0; i < args.size(); ++i) {
result[i] = &args[i][0];
@@ -635,6 +637,7 @@ std::unique_ptr<char*[]> CreateArgvFromArgs(std::vector<std::string>& args) {
result[args.size()] = nullptr; // extra null terminator
return result;
}
+#endif
#ifdef GTEST_OS_WINDOWS
// WindowsDeathTest implements death tests on Windows. Due to the