This is an archive of the discontinued Mercurial Phabricator instance.

cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls
ClosedPublic

Authored by durin42 on Oct 17 2017, 5:45 PM.

Details

Summary

This gives clang-format the right notion about formatting these struct
initializers, therefore allowing us to automatically format several
additional files.

  1. skip-blame because this is just a content-free comment addition

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Oct 17 2017, 5:45 PM
indygreg accepted this revision.Oct 18 2017, 11:48 AM
indygreg added a subscriber: indygreg.

Oh, I was wondering how to do this. AFAICT this feature is not documented at https://clang.llvm.org/docs/ClangFormat.html or https://clang.llvm.org/docs/ClangFormatStyleOptions.html. Boo.

This revision is now accepted and ready to land.Oct 18 2017, 11:48 AM
This revision was automatically updated to reflect the committed changes.

I figured this out by finding a bug at Google on this topic, and then djasper showed me a workaround and said he'd look again at fixing the other case we're stuck on.