diff options
author | Miklos Vajna <vmiklos@vmiklos.hu> | 2018-10-21 19:16:25 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@vmiklos.hu> | 2018-10-21 19:16:25 +0000 |
commit | 638587986fe19210184452b6294f0a9df5393c45 (patch) | |
tree | a44c97f30e045ed6e2a3c9510a8bb78bad548b9a /clang-tools-extra/docs | |
parent | 5367fb8181d788bf54bb399b4fe74dd094b2c371 (diff) |
[clang-tidy] add IgnoreMacros option to readability-redundant-smartptr-get
And also enable it by default to be consistent with e.g. modernize-use-using.
This helps e.g. when running this check on client code where the macro is
provided by the system, so there is no easy way to modify it.
Reviewed By: JonasToth
Differential Revision: https://reviews.llvm.org/D53454
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r-- | clang-tools-extra/docs/ReleaseNotes.rst | 4 | ||||
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 1af6d050206..5c1fde5d0de 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -67,6 +67,10 @@ The improvements are... Improvements to clang-tidy -------------------------- +- The :doc:`readability-redundant-smartptr-get + <clang-tidy/checks/readability-redundant-smartptr-get>` check does not warn + about calls inside macros anymore by default. + - New :doc:`abseil-duration-division <clang-tidy/checks/abseil-duration-division>` check. 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 3fc77c5f5e2..54894196877 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 @@ -14,3 +14,8 @@ Examples: *ptr->get() ==> **ptr if (ptr.get() == nullptr) ... => if (ptr == nullptr) ... + +.. option:: IgnoreMacros + + If this option is set to non-zero (default is `1`), the check will not warn + about calls inside macros. |