CMS 3D CMS Logo

GlobalStaticChecker.h
Go to the documentation of this file.
1 //== GlobalStaticChecker.h - Checks for non-const global statics --------------*- C++ -*--==//
2 //
3 // by Thomas Hauth [ Thomas.Hauth@cern.ch ]
4 //
5 //===----------------------------------------------------------------------===//
6 #ifndef Utilities_StaticAnalyzers_GlobalStaticChecker_h
7 #define Utilities_StaticAnalyzers_GlobalStaticChecker_h
8 
9 #include <clang/StaticAnalyzer/Core/Checker.h>
10 #include <clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h>
11 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
13 #include "CmsException.h"
14 
15 namespace clangcms {
16  class GlobalStaticChecker : public clang::ento::Checker<clang::ento::check::ASTDecl<clang::VarDecl> > {
17  CMS_SA_ALLOW mutable std::unique_ptr<clang::ento::BuiltinBug> BT;
18 
19  public:
20  void checkASTDecl(const clang::VarDecl *D, clang::ento::AnalysisManager &Mgr, clang::ento::BugReporter &BR) const;
21 
22  private:
24  };
25 
26 } // namespace clangcms
27 
28 #endif
#define CMS_SA_ALLOW
void checkASTDecl(const clang::VarDecl *D, clang::ento::AnalysisManager &Mgr, clang::ento::BugReporter &BR) const
std::unique_ptr< clang::ento::BuiltinBug > BT
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141