10#include "../utils/Matchers.h"
11#include "clang/AST/ASTContext.h"
12#include "clang/ASTMatchers/ASTMatchFinder.h"
22 cxxThrowExpr(has(ignoringParenImpCasts(
23 cxxConstructExpr(hasDeclaration(cxxConstructorDecl(
24 isCopyConstructor(), unless(isNoThrow()))))
30 const auto *
E = Result.Nodes.getNodeAs<Expr>(
"expr");
32 "thrown exception type is not nothrow copy constructible");
DiagnosticBuilder diag(SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning)
Add a diagnostic with the check's name.
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.