This is an archive of the discontinued LLVM Phabricator instance.

Fix Google Test compilation failure when standard library implements LWG 2221
AbandonedPublic

Authored by Godin on May 13 2021, 1:34 AM.

Details

Reviewers
pcc
bkramer
Summary

Without this patch when using CMAKE_CXX_STANDARD=17
and MSVC 19.28.29914.0 compilation of unit tests
(for example clang\unittests\Basic\SourceManagerTest.cpp)
fails with

llvm\utils\unittest\googletest\include\gtest\gtest-printers.h(250): error C2593: 'operator <<' is ambiguous

Patch is taken from Google Test:
https://github.com/google/googletest/commit/f66ab00704cd47e4e63ef6d425ca14b9192aaebb

Add printer for std::nullptr_t, addressing https://github.com/google/googletest/issues/1616

Diff Detail

Event Timeline

Godin requested review of this revision.May 13 2021, 1:34 AM
Godin created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2021, 1:34 AM

Updated googletest to 1.8.1 in 4dd546131ad2749fbde3e048583cf29d615b9851, which includes this change.