From 711e2bf2ef2fa21b0534869e93e8a3baf60a42a7 Mon Sep 17 00:00:00 2001 From: nautical-exact <167017548+nautical-exact@users.noreply.github.com> Date: Sun, 7 Jun 2026 13:50:21 -0400 Subject: [PATCH] Require a trailing semicolon in define_mock_method --- googlemock/include/gmock/gmock-function-mocker.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googlemock/include/gmock/gmock-function-mocker.h b/googlemock/include/gmock/gmock-function-mocker.h index ac771007b..9c5d2c9fd 100644 --- a/googlemock/include/gmock/gmock-function-mocker.h +++ b/googlemock/include/gmock/gmock-function-mocker.h @@ -372,7 +372,8 @@ using internal::FunctionMocker; _Constness, const, ) int _RefSpec>::Adjust(*this) \ .gmock_##_MethodName(GMOCK_PP_REPEAT( \ GMOCK_INTERNAL_A_MATCHER_ARGUMENT, _Signature, _N)); \ - } + } \ + static_assert(true, "no-op to require trailing semicolon") #define GMOCK_INTERNAL_EXPAND(...) __VA_ARGS__