Add missing `const` in INSTANTIATE_TEST_SUITE_P. Dropping this causes tools like [misc-const-correctness](http://clang.llvm.org/extra/clang-tidy/checks/misc/const-correctness.html) to flag GTEST macro invocations as non-const-correct. PiperOrigin-RevId: 966588433 Change-Id: I896acca9e079288e971a2912c7aa6d17ec6a15e4
diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h index 9e023f9..64c60da 100644 --- a/googletest/include/gtest/gtest-param-test.h +++ b/googletest/include/gtest/gtest-param-test.h
@@ -552,7 +552,7 @@ #define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...) \ static ::testing::internal::ParamGenerator<test_suite_name::ParamType> \ - gtest_##prefix##test_suite_name##_EvalGenerator_() { \ + gtest_##prefix##test_suite_name##_EvalGenerator_() { \ return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_)); \ } \ static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_( \ @@ -562,7 +562,7 @@ __VA_ARGS__, \ ::testing::internal::DefaultParamName<test_suite_name::ParamType>, \ DUMMY_PARAM_))); \ - auto t = std::make_tuple(__VA_ARGS__); \ + const auto t = std::make_tuple(__VA_ARGS__); \ static_assert(std::tuple_size<decltype(t)>::value <= 2, \ "Too Many Args!"); \ } \