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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D119923
[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 TimelineHazardyKnusperkeks created this revision. This revision is now accepted and ready to land.Feb 16 2022, 2:23 AM Closed by commit rG9b139923bc66: [clang-format][NFC] Return early in ContinuationIndenter::mustBreak (authored by HazardyKnusperkeks). · Explain WhyFeb 20 2022, 1:35 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 410183 clang/lib/Format/ContinuationIndenter.cpp
|