This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][NFC] Return early in ContinuationIndenter::mustBreak
ClosedPublic

Authored by HazardyKnusperkeks on Feb 16 2022, 1:11 AM.

Details

Summary

We can return as early as possible and only calculate IsComparison if we really need to. Also cache getPrecedence() instead of querying it at most 4 times.

Diff Detail

Event Timeline

HazardyKnusperkeks requested review of this revision.Feb 16 2022, 1:11 AM
HazardyKnusperkeks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2022, 1:11 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius accepted this revision.Feb 16 2022, 2:23 AM

CI is happy, I'm happy :). LGTM!

This revision is now accepted and ready to land.Feb 16 2022, 2:23 AM
owenpan accepted this revision.Feb 17 2022, 12:53 AM