[PATCH] Add NamespaceCommentCheck to the Google module.

Alexander Kornienko alexfh at google.com
Sun Sep 21 17:58:36 PDT 2014


================
Comment at: clang-tidy/llvm/NamespaceCommentCheck.cpp:28
@@ -27,2 +27,3 @@
       ShortNamespaceLines(Options.get("ShortNamespaceLines", 1u)),
-      SpacesBeforeComments(Options.get("SpacesBeforeComments", 1u)) {}
+      SpacesBeforeComments(Options.get("SpacesBeforeComments",
+                                       Name.startswith("google") ? 2u : 1u)) {}
----------------
djasper wrote:
> Maybe this should contain a string NameSpaceCommentPrefix so that we can configure more and e.g. also support:
> 
>   namespace abc {
>   } // abc
It could make sense once we have a style that can't be supported using existing approach.

http://reviews.llvm.org/D5410






More information about the cfe-commits mailing list