This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Fix some C++20 warnings
ClosedPublic

Authored by Godin on Jul 25 2022, 5:18 AM.

Details

Summary

Without this patch when using CMAKE_CXX_STANDARD=20 Microsoft compiler produces following warnings

clang\include\clang/Basic/DiagnosticIDs.h(48): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(49): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(50): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(51): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(52): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(53): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(54): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(55): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(56): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(57): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(58): warning C5054: operator '+': deprecated between enumerations of different types
clang\include\clang/Basic/DiagnosticIDs.h(59): warning C5054: operator '+': deprecated between enumerations of different types

Diff Detail

Event Timeline

Godin created this revision.Jul 25 2022, 5:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 5:18 AM
Godin requested review of this revision.Jul 25 2022, 5:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 5:18 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Jul 26 2022, 3:53 AM

LGTM, thank you!

This revision is now accepted and ready to land.Jul 26 2022, 3:53 AM
Godin added a comment.Jul 26 2022, 4:13 AM

@aaron.ballman thanks for the review! could you please commit this on my behalf since I do not have commit rights?

This revision was landed with ongoing or failed builds.Jul 26 2022, 5:04 AM
Closed by commit rGba198e35fd38: [NFC] Fix some C++20 warnings (authored by Godin, committed by steakhal). · Explain Why
This revision was automatically updated to reflect the committed changes.