This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Add a new flag FixNamespaceComments to FormatStyle
ClosedPublic

Authored by krasimir on Feb 27 2017, 6:53 AM.

Details

Event Timeline

krasimir created this revision.Feb 27 2017, 6:53 AM
krasimir edited the summary of this revision. (Show Details)
krasimir added a subscriber: cfe-commits.
djasper added inline comments.Mar 1 2017, 3:08 AM
include/clang/Format/Format.h
354

To be consistent with the clang-tidy check, just call this "FixNamespaceComments".

After a change like this, you need to call docs/tools/dump_format_style.py in order to update the documentation.

lib/Format/Format.cpp
1837

So much code copied and pasted. Could you pull out a method or lambda and call this with either the JavaScriptRequoter or the NamespaceEndCommentsFixer?

Also, at some point, we'll probably want to call several of these fixers in series. But we can leave that problem for another day.

krasimir updated this revision to Diff 90172.Mar 1 2017, 6:01 AM
krasimir marked 2 inline comments as done.
  • Address review comments
krasimir retitled this revision from [clang-format] Add a new flag FixNamespaceEndComments to FormatStyle to [clang-format] Add a new flag FixNamespaceComments to FormatStyle.Mar 1 2017, 6:02 AM
krasimir edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 1 2017, 6:59 AM
This revision was automatically updated to reflect the committed changes.