#include "TypeTraitsCheck.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
static const llvm::StringSet<> ValueTraits = …;
static const llvm::StringSet<> TypeTraits = …;
static DeclarationName getName(const DependentScopeDeclRefExpr &D) { … }
static DeclarationName getName(const DeclRefExpr &D) { … }
static bool isNamedType(const ElaboratedTypeLoc &ETL) { … }
static bool isNamedType(const DependentNameTypeLoc &DTL) { … }
namespace {
AST_POLYMORPHIC_MATCHER(isValue, AST_POLYMORPHIC_SUPPORTED_TYPES(
DeclRefExpr, DependentScopeDeclRefExpr)) { … }
AST_POLYMORPHIC_MATCHER(isType,
AST_POLYMORPHIC_SUPPORTED_TYPES(ElaboratedTypeLoc,
DependentNameTypeLoc)) { … }
}
static constexpr char Bind[] = …;
void TypeTraitsCheck::registerMatchers(MatchFinder *Finder) { … }
static bool isNamedDeclInStdTraitsSet(const NamedDecl *ND,
const llvm::StringSet<> &Set) { … }
static bool checkTemplatedDecl(const NestedNameSpecifier *NNS,
const llvm::StringSet<> &Set) { … }
TypeTraitsCheck::TypeTraitsCheck(StringRef Name, ClangTidyContext *Context)
: … { … }
void TypeTraitsCheck::check(const MatchFinder::MatchResult &Result) { … }
void TypeTraitsCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
}