#include "UseEmplaceCheck.h"
#include "../utils/OptionsUtils.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
namespace {
AST_MATCHER_P(InitListExpr, initCountLeq, unsigned, N) { … }
AST_MATCHER_P(NamedDecl, hasAnyNameIgnoringTemplates, std::vector<StringRef>,
Names) { … }
AST_MATCHER_P(CallExpr, hasLastArgument,
clang::ast_matchers::internal::Matcher<Expr>, InnerMatcher) { … }
AST_MATCHER(CXXMemberCallExpr, hasSameNumArgsAsDeclNumParams) { … }
AST_MATCHER(DeclRefExpr, hasExplicitTemplateArgs) { … }
auto hasTypeOrPointeeType(
const ast_matchers::internal::Matcher<QualType> &TypeMatcher) { … }
auto hasWantedType(llvm::ArrayRef<StringRef> TypeNames) { … }
auto cxxMemberCallExprOnContainer(
StringRef MethodName, llvm::ArrayRef<StringRef> ContainerNames) { … }
const auto DefaultContainersWithPushBack = …;
const auto DefaultContainersWithPush = …;
const auto DefaultContainersWithPushFront = …;
const auto DefaultSmartPointers = …;
const auto DefaultTupleTypes = …;
const auto DefaultTupleMakeFunctions = …;
const auto DefaultEmplacyFunctions = …;
}
UseEmplaceCheck::UseEmplaceCheck(StringRef Name, ClangTidyContext *Context)
: … { … }
void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { … }
void UseEmplaceCheck::check(const MatchFinder::MatchResult &Result) { … }
void UseEmplaceCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
}