Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:05

0001 //== StaticLocalChecker.h - Checks for non-const static locals --------------*- C++ -*--==//
0002 //
0003 // by Thomas Hauth [ Thomas.Hauth@cern.ch ]
0004 //
0005 //===----------------------------------------------------------------------===//
0006 
0007 #ifndef Utilities_StaticAnalyzers_StaticLocalChecker_h
0008 #define Utilities_StaticAnalyzers_StaticLocalChecker_h
0009 
0010 #include <clang/StaticAnalyzer/Core/Checker.h>
0011 #include <clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h>
0012 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
0013 #include "FWCore/Utilities/interface/thread_safety_macros.h"
0014 #include "CmsException.h"
0015 
0016 namespace clangcms {
0017   class StaticLocalChecker : public clang::ento::Checker<clang::ento::check::ASTDecl<clang::VarDecl> > {
0018     CMS_SA_ALLOW mutable std::unique_ptr<clang::ento::BuiltinBug> BT;
0019 
0020   public:
0021     void checkASTDecl(const clang::VarDecl *D, clang::ento::AnalysisManager &Mgr, clang::ento::BugReporter &BR) const;
0022 
0023   private:
0024     CmsException m_exception;
0025   };
0026 }  // namespace clangcms
0027 
0028 #endif