This is an archive of the discontinued LLVM Phabricator instance.

Fix build failure with MSVC in C++20 mode
ClosedPublic

Authored by Godin on Jan 9 2022, 4:12 PM.

Details

Summary

Without this patch when using CMAKE_CXX_STANDARD=20
and MSVC 19.30.30705.0 compilation fails with

clang\lib\Tooling\Syntax\Tree.cpp(347): error C2666: 'clang::syntax::Tree::ChildIteratorBase<clang::syntax::Tree::ChildIterator,clang::syntax::Node>::operator ==': 4 overloads have similar conversions
clang\lib\Tooling\Syntax\Tree.cpp(392): error C2666: 'clang::syntax::Tree::ChildIteratorBase<clang::syntax::Tree::ChildIterator,clang::syntax::Node>::operator ==': 4 overloads have similar conversions

Note that removed comment that
"iterator_facade_base requires == to be a member"
was made obsolete by change https://reviews.llvm.org/D78938

Diff Detail

Event Timeline

Godin requested review of this revision.Jan 9 2022, 4:12 PM
Godin created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2022, 4:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sammccall accepted this revision.Jan 12 2022, 2:27 AM

Thanks! Much nicer :-)

This revision is now accepted and ready to land.Jan 12 2022, 2:27 AM
Godin added a comment.Jan 13 2022, 1:56 AM

Thank you for the review @sammccall !
Can someone please commit this on my behalf since I do not have commit rights?

This revision was automatically updated to reflect the committed changes.