[clang] Update GoogleTest to v1.14.0 (PR #65823)

Zero Omega via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 11:41:38 PDT 2023


zeroomega wrote:

> I'm seeing some unused functions in files that haven't been changed in years, which I'm guessing come from this update - did the new googletest change how custom output works?
> 
> ```
> llvm/unittests/Support/JSONTest.cpp:490:27: error: unused function 'operator<<' [-Werror,-Wunused-function]
> inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
>                           ^
> 1 error generated.
> ```
> 
> I guess we can just delete this function, but I'm not sure if it means we've degraded the error messages for these tests or anything like that.

Yes new gtest changes how customized function work. These functions either need to be deleted or revised.

I plan to revert this roll as I am seeing some linker error in bots:

```
FAILED: compiler-rt/lib/fuzzer/tests/FuzzerUtils-aarch64-Test /b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/tests/FuzzerUtils-aarch64-Test
cd /b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/tests && /b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/./bin/clang++ FuzzedDataProviderTestObjects.FuzzedDataProviderUnittest.cpp.aarch64.o FuzzedDataProviderTestObjects.gtest-all.cc.aarch64.o -o /b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/tests/./FuzzerUtils-aarch64-Test -fuse-ld=lld -Wl,--color-diagnostics -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -lpthread -nostdlib++ -fno-exceptions /b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/runtimes/runtimes-bins/compiler-rt/lib/fuzzer/libcxx_fuzzer_aarch64/lib/libc++.a -march=armv8-a
ld.lld: error: undefined symbol: testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::__Fuzzer::basic_ostream<char, std::__Fuzzer::char_traits<char>>*)
>>> referenced by gtest-printers.h:158 (/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/runtimes/../third-party/unittest/googletest/include/gtest/gtest-printers.h:158)
>>>               FuzzedDataProviderTestObjects.FuzzedDataProviderUnittest.cpp.aarch64.o:(std::__Fuzzer::basic_string<char, std::__Fuzzer::char_traits<char>, std::__Fuzzer::allocator<char>> testing::internal::FormatForComparisonFailureMessage<FuzzedDataProvider_ConsumeEnum_Test::TestBody()::Enum, FuzzedDataProvider_ConsumeEnum_Test::TestBody()::Enum>(FuzzedDataProvider_ConsumeEnum_Test::TestBody()::Enum const&, FuzzedDataProvider_ConsumeEnum_Test::TestBody()::Enum const&))
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

It will need some time to debug.

https://github.com/llvm/llvm-project/pull/65823


More information about the cfe-commits mailing list