9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_ELSEAFTERRETURNCHECK_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_ELSEAFTERRETURNCHECK_H
12#include "../ClangTidyCheck.h"
13#include "llvm/ADT/DenseMap.h"
26 Preprocessor *ModuleExpanderPP)
override;
28 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
30 return TK_IgnoreUnlessSpelledInSource;
34 llvm::DenseMap<FileID, SmallVector<SourceRange, 1>>;
37 const bool WarnOnUnfixable;
38 const bool WarnOnConditionVariables;
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Flags the usages of else after return.
llvm::DenseMap< FileID, SmallVector< SourceRange, 1 > > ConditionalBranchMap
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override
Override this to register PPCallbacks in the preprocessor.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
std::optional< TraversalKind > getCheckTraversalKind() const override
llvm::StringMap< ClangTidyValue > OptionMap