This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix formatting of the array form of delete.
ClosedPublic

Authored by curdeius on Feb 7 2022, 2:12 AM.

Details

Summary

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

There was an inconsistency in formatting of delete expressions.

Before:

delete (void*)a;
delete[](void*) a;

After this patch:

delete (void*)a;
delete[] (void*)a;

Diff Detail

Event Timeline

curdeius requested review of this revision.Feb 7 2022, 2:12 AM
curdeius created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2022, 2:12 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius updated this revision to Diff 406363.Feb 7 2022, 2:15 AM

Revert unrelated changes.

This revision is now accepted and ready to land.Feb 7 2022, 5:31 AM
owenpan accepted this revision.Feb 7 2022, 9:58 AM
owenpan added inline comments.
clang/unittests/Format/TokenAnnotatorTest.cpp
94

The test name contains “new” and “delete”, but the test cases are all “delete”.

This revision was landed with ongoing or failed builds.Feb 9 2022, 1:36 PM
This revision was automatically updated to reflect the committed changes.
curdeius marked an inline comment as done.