#include "RedundantControlFlowCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::readability {
namespace {
const char *const RedundantReturnDiag = …;
const char *const RedundantContinueDiag = …;
bool isLocationInMacroExpansion(const SourceManager &SM, SourceLocation Loc) { … }
}
void RedundantControlFlowCheck::registerMatchers(MatchFinder *Finder) { … }
void RedundantControlFlowCheck::check(const MatchFinder::MatchResult &Result) { … }
void RedundantControlFlowCheck::checkRedundantReturn(
const MatchFinder::MatchResult &Result, const CompoundStmt *Block) { … }
void RedundantControlFlowCheck::checkRedundantContinue(
const MatchFinder::MatchResult &Result, const CompoundStmt *Block) { … }
void RedundantControlFlowCheck::issueDiagnostic(
const MatchFinder::MatchResult &Result, const CompoundStmt *const Block,
const SourceRange &StmtRange, const char *const Diag) { … }
}