This fixes llvm#63056
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D152825
// overriden method.
const FunctionDecl *Definition = nullptr;
if ((!Function->isDefined(Definition) || Function->isDefaulted() ||
- Function->isDeleted()) &&
+ Definition->isDefaulted() || Function->isDeleted()) &&
(!isa<CXXMethodDecl>(Function) ||
cast<CXXMethodDecl>(Function)->size_overridden_methods() == 0))
return;
<clang-tidy/checks/readability/misleading-indentation>` check when warning would
be unnecessarily emitted for template dependent ``if constexpr``.
+- Fixed a false positive in :doc:`readability-named-parameter
+ <clang-tidy/checks/readability/named-parameter>` for defaulted out-of-line
+ special member functions.
+
- Fixed incorrect fixes in :doc:`readability-redundant-declaration
<clang-tidy/checks/readability/redundant-declaration>` check when linkage
(like ``extern "C"``) is explicitly specified.
typedef void (F)(int);
F f;
void f(int x) {}
+
+namespace issue_63056
+{
+ struct S {
+ S(const S&);
+ S(S&&);
+
+ S& operator=(const S&);
+ S& operator=(S&&);
+ };
+
+ S::S(const S&) = default;
+ S::S(S&&) = default;
+
+ S& S::operator=(const S&) = default;
+ S& S::operator=(S&&) = default;
+} // namespace issue_63056