This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Quit analyzing solution space for large state count
ClosedPublic

Authored by owenpan on Jun 24 2022, 10:22 PM.

Details

Summary

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

When formatting compiler-rt/test/builtins/Unit/udivmodti4_test.c, which contains a nested braced init list with almost 2.5 million tokens, clang-format will run for hours and eventually be killed by the OS. Halving the size of the list would enable clang-format to format the file in a couple of minutes with Count being almost 25 million.

Diff Detail

Event Timeline

owenpan created this revision.Jun 24 2022, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 10:22 PM
owenpan requested review of this revision.Jun 24 2022, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 10:22 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan edited the summary of this revision. (Show Details)Jun 24 2022, 10:37 PM
This revision is now accepted and ready to land.Jun 25 2022, 12:20 AM
MyDeveloperDay accepted this revision.Jun 26 2022, 7:55 AM
curdeius accepted this revision.Jun 26 2022, 1:03 PM