This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix a crash due to dereferencing null MatchingParen
ClosedPublic

Authored by owenpan on Nov 19 2022, 7:17 PM.

Diff Detail

Event Timeline

owenpan created this revision.Nov 19 2022, 7:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2022, 7:17 PM
owenpan requested review of this revision.Nov 19 2022, 7:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2022, 7:17 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
owenpan updated this revision to Diff 476719.Nov 19 2022, 7:31 PM

Added a test case.

Could the check be hoisted to the top of the loop? could that possibly catch more cases?

Oops, nevermind, I misunderstood the loop

Oops, nevermind, I misunderstood the loop

To understand this is really a tough one. Took me some minutes too, to see why the return is needed.

This revision is now accepted and ready to land.Nov 20 2022, 12:16 PM

Oops, nevermind, I misunderstood the loop

To understand this is really a tough one. Took me some minutes too, to see why the return is needed.

I think the fact that almost every word is "Next" doesn't help 😃

MyDeveloperDay accepted this revision.Nov 21 2022, 6:18 AM
This revision was landed with ongoing or failed builds.Nov 21 2022, 12:34 PM
This revision was automatically updated to reflect the committed changes.