10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H 11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H 13 #include "../ClangTidy.h" 14 #include "clang/ASTMatchers/ASTMatchFinder.h" 31 WarnOnMissingElse(
Options.get(
"WarnOnMissingElse", 0)) {}
34 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
37 void handleSwitchWithDefault(
const SwitchStmt *Switch, std::size_t CaseCount);
38 void handleSwitchWithoutDefault(
39 const SwitchStmt *Switch, std::size_t CaseCount,
40 const ast_matchers::MatchFinder::MatchResult &Result);
44 const bool WarnOnMissingElse;
51 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H
Base class for all clang-tidy checks.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
MultiwayPathsCoveredCheck(StringRef Name, ClangTidyContext *Context)
Find occasions where not all codepaths are explicitly covered in code.
std::map< std::string, std::string > OptionMap
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.