This is an archive of the discontinued LLVM Phabricator instance.

Add NamespaceCommentCheck to the Google module.
ClosedPublic

Authored by alexfh on Sep 19 2014, 5:56 AM.

Details

Summary

This uses a bit hacky way to set the defaults for the spaces before
comments, but it's also one of the simplest ways. Fixed a bug with how the
SpacesBeforeComments option was used.

Diff Detail

Event Timeline

alexfh updated this revision to Diff 13863.Sep 19 2014, 5:56 AM
alexfh retitled this revision from to Add NamespaceCommentCheck to the Google module..
alexfh updated this object.
alexfh edited the test plan for this revision. (Show Details)
alexfh added a reviewer: djasper.
alexfh added a subscriber: Unknown Object (MLST).
djasper edited edge metadata.Sep 19 2014, 6:03 AM

Hm.. Should we just move this to misc-? Doesn't seem to be specific to either Google or LLVM style..

clang-tidy/llvm/NamespaceCommentCheck.cpp
0

Maybe this should contain a string NameSpaceCommentPrefix so that we can configure more and e.g. also support:

namespace abc {
} // abc
alexfh updated this revision to Diff 13915.Sep 21 2014, 5:56 PM
alexfh edited edge metadata.

Moved NamespaceCommentCheck.* to clang-tidy/readability.

alexfh added inline comments.Sep 21 2014, 5:58 PM
clang-tidy/llvm/NamespaceCommentCheck.cpp
0

It could make sense once we have a style that can't be supported using existing approach.

djasper accepted this revision.Sep 22 2014, 3:11 AM
djasper edited edge metadata.

Looks good, I think, although I find the display of added/deleted files a bit confusing.

This revision is now accepted and ready to land.Sep 22 2014, 3:11 AM
alexfh closed this revision.Sep 22 2014, 3:51 AM