CMS 3D CMS Logo

CatchAll.h
Go to the documentation of this file.
1 //==-- CatchAll.h - Checks for catch(...) in source files --------------*- C++ -*--==//
2 //
3 // by Shahzad Malik MUZAFFAR [ Shahzad.Malik.MUZAFFAR@cern.ch ]
4 //
5 //===----------------------------------------------------------------------===//
6 #ifndef Utilities_StaticAnalyzers_CatchAll_h
7 #define Utilities_StaticAnalyzers_CatchAll_h
8 
9 #include <clang/StaticAnalyzer/Core/Checker.h>
10 #include <clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h>
11 #include <clang/AST/StmtCXX.h>
12 
13 namespace clangcms {
14  class CatchAll : public clang::ento::Checker<clang::ento::check::ASTCodeBody> {
15  public:
16  void checkASTCodeBody(const clang::Decl* D, clang::ento::AnalysisManager&, clang::ento::BugReporter& BR) const;
17 
18  private:
19  const clang::Stmt* process(const clang::Stmt* S) const;
20  inline bool checkCatchAll(const clang::CXXCatchStmt* S) const { return S->getCaughtType().isNull(); }
21  };
22 } // namespace clangcms
23 #endif
clangcms::CatchAll
Definition: CatchAll.h:14
clangcms::CatchAll::checkASTCodeBody
void checkASTCodeBody(const clang::Decl *D, clang::ento::AnalysisManager &, clang::ento::BugReporter &BR) const
clangcms
Definition: ArgSizeChecker.h:10
clangcms::CatchAll::process
const clang::Stmt * process(const clang::Stmt *S) const
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
S
Definition: CSCDBL1TPParametersExtended.h:16
clangcms::CatchAll::checkCatchAll
bool checkCatchAll(const clang::CXXCatchStmt *S) const
Definition: CatchAll.h:20