[clang-tidy] Remove the google-readability-redundant-smartptr-get alias
authorAlexander Kornienko <alexfh@google.com>
Thu, 21 Jun 2018 16:14:27 +0000 (16:14 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 21 Jun 2018 16:14:27 +0000 (16:14 +0000)
I don't remember why I added it, but it's definitely not needed, since the check
doesn't have any options and the check doesn't have any special relation to the
Google C++ style.

llvm-svn: 335252

clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst [deleted file]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst

index 8962f7f..f4f4118 100644 (file)
@@ -13,7 +13,6 @@
 #include "../readability/BracesAroundStatementsCheck.h"
 #include "../readability/FunctionSizeCheck.h"
 #include "../readability/NamespaceCommentCheck.h"
-#include "../readability/RedundantSmartptrGetCheck.h"
 #include "AvoidCStyleCastsCheck.h"
 #include "AvoidThrowingObjCExceptionCheck.h"
 #include "DefaultArgumentsCheck.h"
@@ -71,9 +70,6 @@ class GoogleModule : public ClangTidyModule {
     CheckFactories
         .registerCheck<clang::tidy::readability::NamespaceCommentCheck>(
             "google-readability-namespace-comments");
-    CheckFactories
-        .registerCheck<clang::tidy::readability::RedundantSmartptrGetCheck>(
-            "google-readability-redundant-smartptr-get");
   }
 
   ClangTidyOptions getModuleOptions() override {
index be867ec..84fe820 100644 (file)
@@ -193,6 +193,10 @@ Improvements to clang-tidy
   <clang-tidy/checks/cppcoreguidelines-avoid-goto>`
   added.
 
+- Removed the `google-readability-redundant-smartptr-get` alias of the
+  :doc:`readability-redundant-smartptr-get
+  <clang-tidy/checks/readability-redundant-smartptr-get>` check.
+
 - The 'misc-forwarding-reference-overload' check was renamed to :doc:`bugprone-forwarding-reference-overload
   <clang-tidy/checks/bugprone-forwarding-reference-overload>`
 
diff --git a/clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst b/clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst
deleted file mode 100644 (file)
index e77fd64..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. title:: clang-tidy - google-readability-redundant-smartptr-get
-.. meta::
-   :http-equiv=refresh: 5;URL=readability-redundant-smartptr-get.html
-
-google-readability-redundant-smartptr-get
-=========================================
-
-The google-readability-redundant-smartptr-get check is an alias, please see
-`readability-redundant-smartptr-get <readability-redundant-smartptr-get.html>`_
-for more information.
index 50f074f..3795981 100644 (file)
@@ -93,8 +93,8 @@ 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-header-anon-namespaces (redirects to google-build-namespaces) <fuchsia-header-anon-namespaces>
    fuchsia-multiple-inheritance
    fuchsia-overloaded-operator
    fuchsia-restrict-system-includes
@@ -113,7 +113,6 @@ Clang-Tidy Checks
    google-readability-casting
    google-readability-function-size (redirects to readability-function-size) <google-readability-function-size>
    google-readability-namespace-comments (redirects to llvm-namespace-comment) <google-readability-namespace-comments>
-   google-readability-redundant-smartptr-get (redirects to readability-redundant-smartptr-get) <google-readability-redundant-smartptr-get>
    google-readability-todo
    google-runtime-int
    google-runtime-operator
index acf7986..3fc77c5 100644 (file)
@@ -3,9 +3,6 @@
 readability-redundant-smartptr-get
 ==================================
 
-`google-readability-redundant-smartptr-get` redirects here as an alias for this
-check.
-
 Find and remove redundant calls to smart pointer's ``.get()`` method.
 
 Examples:
@@ -15,4 +12,5 @@ Examples:
   ptr.get()->Foo()  ==>  ptr->Foo()
   *ptr.get()  ==>  *ptr
   *ptr->get()  ==>  **ptr
+  if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...