From 4f3439a804d1ac9b15dea7c0953e4b0e74e7140d Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Sun, 4 Jan 2026 13:42:15 -0800 Subject: [PATCH] gtest.cc: declare fail_if_no_test_linked flag Clang's -Wmissing-variable-declarations flags this as an issue since the flag is only used in `gtest.cc`. Declare the flag beforehand to ensure that the variable scope is properly limited to `gtest.cc`. Signed-off-by: Enji Cooper --- googletest/src/gtest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 80a7edad9..34f8ca084 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -263,6 +263,7 @@ GTEST_DEFINE_bool_( testing::GetDefaultFailFast()), "True if and only if a test failure should stop further test execution."); +GTEST_DECLARE_bool_(fail_if_no_test_linked); GTEST_DEFINE_bool_( fail_if_no_test_linked, testing::internal::BoolFromGTestEnv("fail_if_no_test_linked", false),