This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Don't misannotate left squares as lambda introducers
ClosedPublic

Authored by owenpan on Mar 30 2023, 8:33 PM.

Details

Summary

A left square can start a lambda only if it's not preceded by an identifier other than return and co-wait/co-yield/co-return.

Fixes https://github.com/llvm/llvm-project/issues/54245.
Fixes https://github.com/llvm/llvm-project/issues/61786.

Diff Detail

Event Timeline

owenpan created this revision.Mar 30 2023, 8:33 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptMar 30 2023, 8:33 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan requested review of this revision.Mar 30 2023, 8:33 PM
rymiel accepted this revision.Mar 30 2023, 9:22 PM

This is great!

This revision is now accepted and ready to land.Mar 30 2023, 9:22 PM

This is great!

Thanks!

This revision was landed with ongoing or failed builds.Mar 31 2023, 4:13 PM
This revision was automatically updated to reflect the committed changes.