clang-tools  7.0.0svn
Classes | Functions
clang::tidy::hicpp Namespace Reference

Classes

class  ExceptionBaseclassCheck
 Check for thrown exceptions and enforce they are all derived from std::exception. More...
 
class  HICPPModule
 
class  MultiwayPathsCoveredCheck
 Find occasions where not all codepaths are explicitly covered in code. More...
 
class  NoAssemblerCheck
 Find assembler statements. More...
 
class  SignedBitwiseCheck
 This check implements the rule 5.6.1 of the HICPP Standard, which disallows bitwise operations on signed integer types. More...
 

Functions

static ClangTidyModuleRegistry::Add< HICPPModuleX ("hicpp-module", "Adds High-Integrity C++ checks.")
 
static std::pair< std::size_t, bool > countCaseLabels (const SwitchStmt *Switch)
 
static std::size_t twoPow (std::size_t Bits)
 This function calculate 2 ** Bits and returns numeric_limits<std::size_t>::max() if an overflow occured. More...
 
static std::size_t getNumberOfPossibleValues (QualType T, const ASTContext &Context)
 Get the number of possible values that can be switched on for the type T. More...
 

Function Documentation

◆ countCaseLabels()

static std::pair<std::size_t, bool> clang::tidy::hicpp::countCaseLabels ( const SwitchStmt *  Switch)
static

◆ getNumberOfPossibleValues()

static std::size_t clang::tidy::hicpp::getNumberOfPossibleValues ( QualType  T,
const ASTContext &  Context 
)
static

Get the number of possible values that can be switched on for the type T.

Returns
- 0 if bitcount could not be determined
  • numeric_limits<std::size_t>::max() when overflow appeared due to more than 64 bits type size.

Definition at line 82 of file MultiwayPathsCoveredCheck.cpp.

Referenced by clang::tidy::hicpp::MultiwayPathsCoveredCheck::check().

◆ twoPow()

static std::size_t clang::tidy::hicpp::twoPow ( std::size_t  Bits)
static

This function calculate 2 ** Bits and returns numeric_limits<std::size_t>::max() if an overflow occured.

Definition at line 71 of file MultiwayPathsCoveredCheck.cpp.

Referenced by clang::tidy::hicpp::MultiwayPathsCoveredCheck::check().

◆ X()

static ClangTidyModuleRegistry::Add<HICPPModule> clang::tidy::hicpp::X ( "hicpp-module"  ,
"Adds High-Integrity C++ checks."   
)
static