CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Utilities/StaticAnalyzers/src/StaticLocalChecker.h

Go to the documentation of this file.
00001 //== StaticLocalChecker.h - Checks for non-const static locals --------------*- C++ -*--==//
00002 //
00003 // by Thomas Hauth [ Thomas.Hauth@cern.ch ]
00004 //
00005 //===----------------------------------------------------------------------===//
00006 
00007 #ifndef Utilities_StaticAnalyzers_StaticLocalChecker_h
00008 #define Utilities_StaticAnalyzers_StaticLocalChecker_h
00009 
00010 #include <clang/StaticAnalyzer/Core/Checker.h>
00011 #include <clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h>
00012 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
00013 
00014 #include "CmsException.h"
00015 
00016 
00017 namespace clangcms {
00018 class StaticLocalChecker : public clang::ento::Checker< clang::ento::check::ASTDecl< clang::VarDecl> > {
00019   mutable clang::OwningPtr<clang::ento::BuiltinBug> BT;
00020 
00021 public:
00022   void checkASTDecl(const clang::VarDecl *D,
00023                       clang::ento::AnalysisManager &Mgr,
00024                       clang::ento::BugReporter &BR) const;
00025 private:
00026   CmsException m_exception;
00027 };  
00028 }
00029 
00030 #endif