This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Treat &/&& as reference when followed by requires clause
ClosedPublic

Authored by rymiel on Mar 8 2023, 11:17 PM.

Details

Summary

Previously, the token annotator would get confused and annotate a member
function's ref qualifier as a binary operator, if said function also had
a requires clause after it.

This patch accounts for that, treating requires clauses more similarly
to noexcept, which also comes after the ref qualifier.

Fixes https://github.com/llvm/llvm-project/issues/61270

Diff Detail

Event Timeline

rymiel created this revision.Mar 8 2023, 11:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 11:17 PM
rymiel requested review of this revision.Mar 8 2023, 11:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 11:17 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Mar 9 2023, 4:29 AM
owenpan accepted this revision.Mar 9 2023, 6:14 PM
This revision was landed with ongoing or failed builds.Mar 14 2023, 3:46 AM
This revision was automatically updated to reflect the committed changes.