#include "UnusedLocalNonTrivialVariableCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Type.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/ASTMatchers/ASTMatchersMacros.h"
usingnamespaceclang::ast_matchers;
usingnamespaceclang::tidy::matchers;
namespace clang::tidy::bugprone {
namespace {
static constexpr StringRef DefaultIncludeTypeRegex = …;
AST_MATCHER(VarDecl, isLocalVarDecl) { … }
AST_MATCHER(VarDecl, isReferenced) { … }
AST_MATCHER(Type, isReferenceType) { … }
AST_MATCHER(QualType, isTrivial) { … }
}
UnusedLocalNonTrivialVariableCheck::UnusedLocalNonTrivialVariableCheck(
StringRef Name, ClangTidyContext *Context)
: … { … }
void UnusedLocalNonTrivialVariableCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) { … }
void UnusedLocalNonTrivialVariableCheck::registerMatchers(MatchFinder *Finder) { … }
void UnusedLocalNonTrivialVariableCheck::check(
const MatchFinder::MatchResult &Result) { … }
bool UnusedLocalNonTrivialVariableCheck::isLanguageVersionSupported(
const LangOptions &LangOpts) const { … }
std::optional<TraversalKind>
UnusedLocalNonTrivialVariableCheck::getCheckTraversalKind() const { … }
}