11 #include "../utils/Matchers.h" 12 #include "clang/AST/ASTContext.h" 13 #include "clang/ASTMatchers/ASTMatchFinder.h" 21 void ThrownExceptionTypeCheck::registerMatchers(MatchFinder *Finder) {
22 if (!getLangOpts().CPlusPlus)
26 cxxThrowExpr(has(ignoringParenImpCasts(
27 cxxConstructExpr(hasDeclaration(cxxConstructorDecl(
28 isCopyConstructor(), unless(isNoThrow()))))
33 void ThrownExceptionTypeCheck::check(
const MatchFinder::MatchResult &
Result) {
34 const auto *E = Result.Nodes.getNodeAs<Expr>(
"expr");
36 "thrown exception type is not nothrow copy constructible");
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//