#include "EmptyCatchCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include <algorithm>
usingnamespaceclang::ast_matchers;
Matcher;
namespace clang::tidy::bugprone {
namespace {
AST_MATCHER(CXXCatchStmt, isInMacro) { … }
AST_MATCHER_P(CXXCatchStmt, hasHandler, Matcher<Stmt>, InnerMatcher) { … }
AST_MATCHER_P(CXXCatchStmt, hasCaughtType, Matcher<QualType>, InnerMatcher) { … }
AST_MATCHER_P(CompoundStmt, hasAnyTextFromList, std::vector<llvm::StringRef>,
List) { … }
}
EmptyCatchCheck::EmptyCatchCheck(StringRef Name, ClangTidyContext *Context)
: … { … }
void EmptyCatchCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
bool EmptyCatchCheck::isLanguageVersionSupported(
const LangOptions &LangOpts) const { … }
std::optional<TraversalKind> EmptyCatchCheck::getCheckTraversalKind() const { … }
void EmptyCatchCheck::registerMatchers(MatchFinder *Finder) { … }
void EmptyCatchCheck::check(const MatchFinder::MatchResult &Result) { … }
}