[PATCH] Add NamespaceCommentCheck to the Google module.

Daniel Jasper djasper at google.com
Fri Sep 19 06:03:08 PDT 2014


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

================
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)) {}
----------------
Maybe this should contain a string NameSpaceCommentPrefix so that we can configure more and e.g. also support:

  namespace abc {
  } // abc

http://reviews.llvm.org/D5410






More information about the cfe-commits mailing list