57 auto PrivateSpecialFn = cxxMethodDecl(isPrivate(), isSpecialFunction());
61 PrivateSpecialFn, unless(hasAnyDefinition()), unless(isUsed()),
64 unless(ofClass(hasMethod(cxxMethodDecl(unless(PrivateSpecialFn),
65 unless(hasAnyDefinition()))))))
75 if (
const auto *Func =
77 SourceLocation EndLoc = Lexer::getLocForEndOfToken(
78 Func->getEndLoc(), 0, *Result.SourceManager, getLangOpts());
80 if (IgnoreMacros && Func->getLocation().isMacroID())
83 diag(Func->getLocation(),
84 "use '= delete' to prohibit calling of a special member function")
85 << FixItHint::CreateInsertion(EndLoc,
" = delete");
86 }
else if (
const auto *Func =
91 if (IgnoreMacros && Func->getLocation().isMacroID())
94 diag(Func->getLocation(),
"deleted member function should be public");
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.