clang-tools 23.0.0git
clang::tidy::bugprone::UnhandledCodePathsCheck Class Reference

Find occasions where not all codepaths are explicitly covered in code. More...

#include <UnhandledCodePathsCheck.h>

Inheritance diagram for clang::tidy::bugprone::UnhandledCodePathsCheck:
[legend]

Public Member Functions

 UnhandledCodePathsCheck (StringRef Name, ClangTidyContext *Context)
void storeOptions (ClangTidyOptions::OptionMap &Opts) override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Find occasions where not all codepaths are explicitly covered in code.

This includes 'switch' without a 'default'-branch and 'if'-'else if'-chains without a final 'else'-branch.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unhandled-code-paths.html

Definition at line 22 of file UnhandledCodePathsCheck.h.

Constructor & Destructor Documentation

◆ UnhandledCodePathsCheck()

clang::tidy::bugprone::UnhandledCodePathsCheck::UnhandledCodePathsCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file UnhandledCodePathsCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::UnhandledCodePathsCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ registerMatchers()

void clang::tidy::bugprone::UnhandledCodePathsCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 22 of file UnhandledCodePathsCheck.cpp.

◆ storeOptions()

void clang::tidy::bugprone::UnhandledCodePathsCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

Definition at line 18 of file UnhandledCodePathsCheck.cpp.


The documentation for this class was generated from the following files: