This is an archive of the discontinued LLVM Phabricator instance.

[clang-format][NFC] Clean up the unwrapped line parser
ClosedPublic

Authored by owenpan on Jun 3 2022, 2:50 PM.

Details

Summary

Change the signatures of parseBlock(), parseLevel(), and parseStructuralElement() to support combining else and if when removing braces. See https://github.com/llvm/llvm-project/issues/55663.

Diff Detail

Event Timeline

owenpan created this revision.Jun 3 2022, 2:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 2:50 PM
owenpan requested review of this revision.Jun 3 2022, 2:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 2:50 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan planned changes to this revision.Jun 4 2022, 2:23 PM
owenpan updated this revision to Diff 434287.Jun 4 2022, 2:34 PM
owenpan edited the summary of this revision. (Show Details)

Restored the prototype of parseStructuralElement().

owenpan planned changes to this revision.Jun 4 2022, 8:47 PM
owenpan updated this revision to Diff 434366.Jun 5 2022, 7:00 PM
owenpan edited the summary of this revision. (Show Details)

Restored the return type of parseLevel() and reordered the parameters of parseStructuralElement().

This revision is now accepted and ready to land.Jun 6 2022, 1:55 AM
This revision was automatically updated to reflect the committed changes.