10#include "clang/ASTMatchers/ASTMatchFinder.h"
21 cxxMethodDecl(unless(isDeleted()),
22 anyOf(cxxConstructorDecl(isMoveConstructor()),
23 isMoveAssignmentOperator()))
28DiagnosticBuilder NoexceptMoveConstructorCheck::reportMissingNoexcept(
31 "move %select{assignment operator|constructor}0s should "
33 << CXXConstructorDecl::classof(
FuncDecl);
36void NoexceptMoveConstructorCheck::reportNoexceptEvaluatedToFalse(
37 const FunctionDecl *
FuncDecl,
const Expr *NoexceptExpr) {
38 diag(NoexceptExpr->getExprLoc(),
39 "noexcept specifier on the move %select{assignment "
40 "operator|constructor}0 evaluates to 'false'")
41 << CXXConstructorDecl::classof(
FuncDecl);
DiagnosticBuilder diag(SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning)
Add a diagnostic with the check's name.
static constexpr const char FuncDecl[]