CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  {
16  public:
17  void checkASTCodeBody(const clang::Decl* D, clang::ento::AnalysisManager&, clang::ento::BugReporter& BR) const;
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 }
23 #endif
const clang::Stmt * process(const clang::Stmt *S) const
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
bool checkCatchAll(const clang::CXXCatchStmt *S) const
Definition: CatchAll.h:20
void checkASTCodeBody(const clang::Decl *D, clang::ento::AnalysisManager &, clang::ento::BugReporter &BR) const
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99