summaryrefslogtreecommitdiff
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2018-06-21 16:14:27 +0000
committerAlexander Kornienko <alexfh@google.com>2018-06-21 16:14:27 +0000
commitf13f76b74b73792703046dcfe07e08357e9dcd15 (patch)
tree2aec95702a4d1d84b8c1b6cef188e9f95dc7408a /clang-tools-extra
parentbb6157a0e44b4ab4273e06f95798d22de5b7b1ae (diff)
[clang-tidy] Remove the google-readability-redundant-smartptr-get alias
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.
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp4
-rw-r--r--clang-tools-extra/docs/ReleaseNotes.rst4
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst10
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/list.rst3
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst4
5 files changed, 6 insertions, 19 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
index 8962f7f6665..f4f4118bb72 100644
--- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
@@ -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 {
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index be867eca90d..84fe8206460 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -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
index e77fd64a3e9..00000000000
--- a/clang-tools-extra/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst
+++ /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.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index 50f074fc9c7..3795981b495 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -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
diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
index acf79860de7..3fc77c5f5e2 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
@@ -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) ...