[PATCH] D45447: [clang-tidy] Adding alias for anon namespaces in header (fuchsia module)

Julie Hockett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 9 10:27:10 PDT 2018


juliehockett created this revision.
juliehockett added reviewers: aaron.ballman, hokein, ilya-biryukov.
juliehockett added a project: clang-tools-extra.
Herald added a subscriber: xazax.hun.

Adding alias to google-build-namespaces to the Fuchsia module (checks for anonymous namespaces in headers).


https://reviews.llvm.org/D45447

Files:
  clang-tidy/fuchsia/FuchsiaTidyModule.cpp
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
  docs/clang-tidy/checks/google-build-namespaces.rst
  docs/clang-tidy/checks/list.rst


Index: docs/clang-tidy/checks/list.rst
===================================================================
--- docs/clang-tidy/checks/list.rst
+++ docs/clang-tidy/checks/list.rst
@@ -90,6 +90,7 @@
    cppcoreguidelines-pro-type-vararg
    cppcoreguidelines-slicing
    cppcoreguidelines-special-member-functions
+   fuchsia-header-anon-namespaces (redirects to google-build-namespaces) <fuchsia-header-anon-namespaces>
    fuchsia-default-arguments
    fuchsia-multiple-inheritance
    fuchsia-overloaded-operator
Index: docs/clang-tidy/checks/google-build-namespaces.rst
===================================================================
--- docs/clang-tidy/checks/google-build-namespaces.rst
+++ docs/clang-tidy/checks/google-build-namespaces.rst
@@ -4,6 +4,7 @@
 =======================
 
 `cert-dcl59-cpp` redirects here as an alias for this check.
+`fuchsia-header-anon-namespaces` redirects here as an alias for this check.
 
 Finds anonymous namespaces in headers.
 
Index: docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
===================================================================
--- /dev/null
+++ docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
@@ -0,0 +1,10 @@
+.. title:: clang-tidy - fuchsia-header-anon-namespaces
+.. meta::
+   :http-equiv=refresh: 5;URL=google-build-namespaces.html
+
+fuchsia-header-anon-namespaces
+=========================
+
+The fuchsia-header-anon-namespaces check is an alias, please see
+`google-build-namespace <google-build-namespaces.html>`_
+for more information.
Index: docs/ReleaseNotes.rst
===================================================================
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -88,6 +88,11 @@
   with looping constructs. Every backward jump is rejected. Forward jumps are
   only allowed in nested loops.
 
+- New alias :doc:`fuchsia-header-anon-namespaces
+  <clang-tidy/checks/fuchsia-header-anon-namespaces>` to :doc:`google-build-namespaces
+  <clang-tidy/checks/google-build-namespaces>`
+  added.
+
 - New :doc:`fuchsia-multiple-inheritance
   <clang-tidy/checks/fuchsia-multiple-inheritance>` check
 
Index: clang-tidy/fuchsia/FuchsiaTidyModule.cpp
===================================================================
--- clang-tidy/fuchsia/FuchsiaTidyModule.cpp
+++ clang-tidy/fuchsia/FuchsiaTidyModule.cpp
@@ -10,6 +10,7 @@
 #include "../ClangTidy.h"
 #include "../ClangTidyModule.h"
 #include "../ClangTidyModuleRegistry.h"
+#include "../google/UnnamedNamespaceInHeaderCheck.h"
 #include "DefaultArgumentsCheck.h"
 #include "MultipleInheritanceCheck.h"
 #include "OverloadedOperatorCheck.h"
@@ -29,6 +30,8 @@
   void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
     CheckFactories.registerCheck<DefaultArgumentsCheck>(
         "fuchsia-default-arguments");
+    CheckFactories.registerCheck<google::build::UnnamedNamespaceInHeaderCheck>(
+        "fuchsia-header-anon-namespaces");
     CheckFactories.registerCheck<MultipleInheritanceCheck>(
         "fuchsia-multiple-inheritance");
     CheckFactories.registerCheck<OverloadedOperatorCheck>(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45447.141679.patch
Type: text/x-patch
Size: 3094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180409/0efb8f84/attachment.bin>


More information about the cfe-commits mailing list