]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge r357342 from the clang1000-import branch:
authordim <dim@FreeBSD.org>
Fri, 31 Jan 2020 19:06:01 +0000 (19:06 +0000)
committerdim <dim@FreeBSD.org>
Fri, 31 Jan 2020 19:06:01 +0000 (19:06 +0000)
commit4716074cdcbb898113b886b0507c84b0a332b277
tree3966645855661e56ed5b6f9b665c636e0ddddfb6
parentd57fc34f88209b609d84c055704a2babb257633e
Merge r357342 from the clang1000-import branch:

Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.

The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:

/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  void operator=(const CartesianProductHolder3& other);
       ^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
         ^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
        Combine(Bool(),                                 /* async read */
        ^

For now, silence the warning using -Wno-deprecated-copy.

The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:

contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
                                   ^

For now, silence the warning using -Wno-signed-unsigned-wchar.

MFC after: 3 days
share/mk/googletest.test.inc.mk