Debian Codegraph @

clang-tools-extra/docs/clang-tidy/checks/readability/redundant-smartptr-get.rst

raw
1 .. title:: clang-tidy - readability-redundant-smartptr-get
2
3 readability-redundant-smartptr-get
4 ==================================
5
6 Find and remove redundant calls to smart pointer's ``.get()`` method.
7
8 Examples:
9
10 .. code-block:: c++
11
12 ptr.get()->Foo() ==> ptr->Foo()
13 *ptr.get() ==> *ptr
14 *ptr->get() ==> **ptr
15 if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...
16
17
18 .. option:: IgnoreMacros
19
20 If this option is set to `true` (default is `true`), the check will not warn
21 about calls inside macros.