Page MenuHomePhabricator

[clang-format] Don't eat two semicolons after namespace
AcceptedPublic

Authored by HazardyKnusperkeks on Nov 19 2022, 8:23 PM.

Details

Summary

Remove the double check, move the comment.

This changes behavior, but I think for the better. Despite the comment my personal opinion would be to not even gracefully handle the one semicolon, it shouldn't be there.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2022, 8:23 PM
HazardyKnusperkeks requested review of this revision.Nov 19 2022, 8:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 19 2022, 8:23 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MyDeveloperDay accepted this revision.Dec 12 2022, 6:50 AM

Feels like this would only show if someone did

namespace A {
};;

Which seems odd

This revision is now accepted and ready to land.Dec 12 2022, 6:50 AM
MyDeveloperDay added inline comments.Dec 12 2022, 6:50 AM
clang/lib/Format/UnwrappedLineParser.cpp
2999

This comment was wrong I guess, because of /*MunchSemi=*/true