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

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

Differential Revision: https://reviews.llvm.org/D45447

llvm-svn: 329720
diff --git a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp b/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
index 59c6389..67b3bc9 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
+++ b/clang-tools-extra/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>(
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 82214ab..d926763 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/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
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst b/clang-tools-extra/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
new file mode 100644
index 0000000..42b5753
--- /dev/null
+++ b/clang-tools-extra/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.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst b/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst
index 69d124d..69c01d3 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/google-build-namespaces.rst
+++ b/clang-tools-extra/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.
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index f639618..61cdcc6 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/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