#include "ConstCorrectnessCheck.h"
#include "../utils/FixItHintUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::misc {
namespace {
AST_MATCHER(VarDecl, isLocal) { … }
AST_MATCHER_P(DeclStmt, containsAnyDeclaration,
ast_matchers::internal::Matcher<Decl>, InnerMatcher) { … }
AST_MATCHER(ReferenceType, isSpelledAsLValue) { … }
AST_MATCHER(Type, isDependentType) { … }
}
ConstCorrectnessCheck::ConstCorrectnessCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void ConstCorrectnessCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
void ConstCorrectnessCheck::registerMatchers(MatchFinder *Finder) { … }
enum class VariableCategory { … };
void ConstCorrectnessCheck::check(const MatchFinder::MatchResult &Result) { … }
void ConstCorrectnessCheck::registerScope(const Stmt *LocalScope,
ASTContext *Context) { … }
}