#include "FasterStringFindCheck.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::performance {
namespace {
std::optional<std::string> makeCharacterLiteral(const StringLiteral *Literal) { … }
AST_MATCHER_FUNCTION(ast_matchers::internal::Matcher<Expr>,
hasSubstitutedType) { … }
}
FasterStringFindCheck::FasterStringFindCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void FasterStringFindCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void FasterStringFindCheck::registerMatchers(MatchFinder *Finder) { … }
void FasterStringFindCheck::check(const MatchFinder::MatchResult &Result) { … }
}