This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] spacesRequiredBetween is not honouring clang-format off/on
ClosedPublic

Authored by MyDeveloperDay on Jan 2 2022, 7:28 AM.

Details

Summary

https://github.com/llvm/llvm-project/issues/52881

It seems that clang-format off/on is not being honoured in regard to adding spaces.

My understanding of clang-format off/on is that it marks the token as finalized based on whether formatting is currently enabled or disabled.

This was causing a space to be added between the < and << in the Cuda kernel foo<<<1, 1>>>();

This if doesn't solve this actual issue but ensure that clang-format is at least honoured.

Diff Detail

Unit TestsFailed

Event Timeline

MyDeveloperDay requested review of this revision.Jan 2 2022, 7:28 AM
MyDeveloperDay created this revision.

Switch to verifyFormat in the tests

curdeius accepted this revision.Jan 2 2022, 9:39 AM

LGTM.

This revision is now accepted and ready to land.Jan 2 2022, 9:39 AM
owenpan accepted this revision.Jan 2 2022, 10:35 AM
This revision was landed with ongoing or failed builds.Jan 3 2022, 3:19 AM
This revision was automatically updated to reflect the committed changes.