#include "ContainerSizeEmptyCheck.h"
#include "../utils/ASTUtils.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/StringRef.h"
usingnamespaceclang::ast_matchers;
namespace clang {
namespace ast_matchers {
AST_POLYMORPHIC_MATCHER_P2(hasAnyArgumentWithParam,
AST_POLYMORPHIC_SUPPORTED_TYPES(CallExpr,
CXXConstructExpr),
internal::Matcher<Expr>, ArgMatcher,
internal::Matcher<ParmVarDecl>, ParamMatcher) { … }
AST_MATCHER(Expr, usedInBooleanContext) { … }
AST_MATCHER(CXXConstructExpr, isDefaultConstruction) { … }
AST_MATCHER(QualType, isIntegralType) { … }
AST_MATCHER_P(UserDefinedLiteral, hasLiteral,
clang::ast_matchers::internal::Matcher<Expr>, InnerMatcher) { … }
}
namespace tidy::readability {
isBinaryOrTernary;
ContainerSizeEmptyCheck::ContainerSizeEmptyCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void ContainerSizeEmptyCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void ContainerSizeEmptyCheck::registerMatchers(MatchFinder *Finder) { … }
void ContainerSizeEmptyCheck::check(const MatchFinder::MatchResult &Result) { … }
}
}