Skip to content

Commit 9ea914f

Browse files
committed
whitespace and formatting fixes
1 parent 8fc9c22 commit 9ea914f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

clang-tools-extra/clang-tidy/bugprone/MoveSharedPointerContentsCheck.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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 "

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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-
157157
New check aliases
158158
^^^^^^^^^^^^^^^^^
159159

0 commit comments

Comments
 (0)