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

Julie Hockett via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 10 09:53:51 PDT 2018


Author: juliehockett
Date: Tue Apr 10 09:53:51 2018
New Revision: 329720

URL: http://llvm.org/viewvc/llvm-project?rev=329720&view=rev
Log:
[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

Added:
    clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
Modified:
    clang-tools-extra/trunk/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
    clang-tools-extra/trunk/docs/ReleaseNotes.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst

Modified: clang-tools-extra/trunk/clang-tidy/fuchsia/FuchsiaTidyModule.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/fuchsia/FuchsiaTidyModule.cpp?rev=329720&r1=329719&r2=329720&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/fuchsia/FuchsiaTidyModule.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/fuchsia/FuchsiaTidyModule.cpp Tue Apr 10 09:53:51 2018
@@ -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 @@ public:
   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>(

Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/ReleaseNotes.rst?rev=329720&r1=329719&r2=329720&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/ReleaseNotes.rst (original)
+++ clang-tools-extra/trunk/docs/ReleaseNotes.rst Tue Apr 10 09:53:51 2018
@@ -88,6 +88,11 @@ Improvements to clang-tidy
   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
 

Added: clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst?rev=329720&view=auto
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst (added)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/fuchsia-header-anon-namespaces.rst Tue Apr 10 09:53:51 2018
@@ -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.

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst?rev=329720&r1=329719&r2=329720&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-build-namespaces.rst Tue Apr 10 09:53:51 2018
@@ -4,6 +4,7 @@ google-build-namespaces
 =======================
 
 `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.
 

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst?rev=329720&r1=329719&r2=329720&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Tue Apr 10 09:53:51 2018
@@ -90,6 +90,7 @@ Clang-Tidy Checks
    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




More information about the cfe-commits mailing list