This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix an assertion failure in block parsing
ClosedPublic

Authored by owenpan on Dec 4 2022, 3:36 PM.

Details

Summary

This assertion failure was introduced in 9ed2e68c9ae5 and is manifested when both RemoveBracesLLVM and MacroBlockBegin are set.

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

Diff Detail

Event Timeline

owenpan created this revision.Dec 4 2022, 3:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2022, 3:36 PM
owenpan requested review of this revision.Dec 4 2022, 3:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 4 2022, 3:36 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

We should rename, remove, or re add the functionality for this function. Or else someone new will come along and be confused.

This revision is now accepted and ready to land.Dec 4 2022, 10:21 PM

We should rename, remove, or re add the functionality for this function. Or else someone new will come along and be confused.

+1

owenpan updated this revision to Diff 480364.Dec 6 2022, 12:50 AM

Moved isBlockBegin() to UnwrappedLineParser.

owenpan requested review of this revision.Dec 6 2022, 12:50 AM
This revision is now accepted and ready to land.Dec 6 2022, 12:05 PM
This revision was landed with ongoing or failed builds.Dec 6 2022, 2:15 PM
This revision was automatically updated to reflect the committed changes.