File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,7 @@ void MoveSharedPointerContentsCheck::check(
125125 }
126126 }
127127
128- if (Call == nullptr && !Call->getBeginLoc ().isValid ()) {
129- return ;
130- }
128+ if (Call == nullptr || !Call->getBeginLoc ().isValid ()) return ;
131129
132130 diag (Call->getBeginLoc (),
133131 " don't move the contents out of a shared pointer, as other accessors "
Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ New checks
130130 Finds setter-like member functions that take a pointer parameter and set a
131131 reference member of the same class with the pointed value.
132132
133+ - New :doc: `bugprone-move-shared-pointer-contents
134+ <clang-tidy/checks/bugprone/move-shared-pointer-contents>` check.
135+
136+ Detects calls to move the contents out of a ``std::shared_ptr `` rather than
137+ moving the pointer itself.
138+
133139- New :doc: `bugprone-unintended-char-ostream-output
134140 <clang-tidy/checks/bugprone/unintended-char-ostream-output>` check.
135141
@@ -148,12 +154,6 @@ New checks
148154 Finds potentially erroneous calls to ``reset `` method on smart pointers when
149155 the pointee type also has a ``reset `` method.
150156
151- - New :doc: `bugprone-move-shared-pointer-contents
152- <clang-tidy/checks/bugprone/move-shared-pointer-contents>` check.
153-
154- Detects calls to move the contents out of a ``std::shared_ptr `` rather than
155- moving the pointer itself.
156-
157157New check aliases
158158^^^^^^^^^^^^^^^^^
159159
You can’t perform that action at this time.
0 commit comments