10#include "clang/ASTMatchers/ASTMatchFinder.h"
20 Finder->addMatcher(functionDecl(unless(isDeleted()), cxxDestructorDecl())
26NoexceptDestructorCheck::reportMissingNoexcept(
const FunctionDecl *
FuncDecl) {
27 return diag(
FuncDecl->getLocation(),
"destructors should "
28 "be marked noexcept");
31void NoexceptDestructorCheck::reportNoexceptEvaluatedToFalse(
32 const FunctionDecl *
FuncDecl,
const Expr *NoexceptExpr) {
33 diag(NoexceptExpr->getExprLoc(),
34 "noexcept specifier on the destructor evaluates to 'false'");
DiagnosticBuilder diag(SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning)
Add a diagnostic with the check's name.
static constexpr const char FuncDecl[]