This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Missing space after cast in a macro
ClosedPublic

Authored by MyDeveloperDay on Jan 4 2022, 3:54 AM.

Details

Summary

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

Though SpaceAfterCStyleCast is set to true, clang-format 13 does not add a space after (void *) here:

#define CONF_BOOL(conf, offset) (bool *) (void *)((char *) (conf) + (offset))

This patch addresses that

Fixes: #52979

Diff Detail

Event Timeline

MyDeveloperDay requested review of this revision.Jan 4 2022, 3:54 AM
MyDeveloperDay created this revision.
curdeius accepted this revision.Jan 4 2022, 4:23 AM

LGTM.

This revision is now accepted and ready to land.Jan 4 2022, 4:23 AM

LGTM except for the nit.

clang/lib/Format/TokenAnnotator.cpp
1888

Nit.

owenpan accepted this revision.Jan 4 2022, 10:38 AM
MyDeveloperDay added inline comments.Jan 4 2022, 10:49 AM
clang/lib/Format/TokenAnnotator.cpp
1888

of course my bad.. will make that change

Fix nit and add a few more tests just to be sure

MyDeveloperDay marked an inline comment as done.Jan 5 2022, 12:47 AM
This revision was landed with ongoing or failed builds.Jan 6 2022, 12:11 AM
This revision was automatically updated to reflect the committed changes.