File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,8 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) {
127
127
hasAncestor (functionDecl ().bind (" func" )),
128
128
hasAncestor (functionDecl (
129
129
isDefinition (), equalsBoundNode (" func" ), ToParam,
130
- unless (hasDescendant (std::move (ForwardCallMatcher)))))),
130
+ unless (anyOf (isDeleted (), hasDescendant (std::move (
131
+ ForwardCallMatcher))))))),
131
132
this );
132
133
}
133
134
Original file line number Diff line number Diff line change @@ -134,6 +134,10 @@ Changes in existing checks
134
134
<clang-tidy/checks/bugprone/unused-local-non-trivial-variable>` check by
135
135
ignoring local variable with ``[maybe_unused] `` attribute.
136
136
137
+ - Improved :doc: `cppcoreguidelines-missing-std-forward
138
+ <clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by no longer
139
+ giving false positives for deleted functions.
140
+
137
141
- Cleaned up :doc: `cppcoreguidelines-prefer-member-initializer
138
142
<clang-tidy/checks/cppcoreguidelines/prefer-member-initializer>`
139
143
by removing enforcement of rule `C.48
Original file line number Diff line number Diff line change @@ -173,3 +173,18 @@ void lambda_value_reference_auxiliary_var(T&& t) {
173
173
}
174
174
175
175
} // namespace negative_cases
176
+
177
+ namespace deleted_functions {
178
+
179
+ template <typename T>
180
+ void f (T &&) = delete;
181
+
182
+ struct S {
183
+ template <typename T>
184
+ S (T &&) = delete ;
185
+
186
+ template <typename T>
187
+ void operator &(T &&) = delete ;
188
+ };
189
+
190
+ } // namespace deleted_functions
You can’t perform that action at this time.
0 commit comments