Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:50

0001 #ifndef Utilities_StaticAnalyzers_ESRGetChecker_h
0002 #define Utilities_StaticAnalyzers_ESRGetChecker_h
0003 #include <clang/AST/DeclCXX.h>
0004 #include <clang/AST/Decl.h>
0005 #include <clang/AST/DeclTemplate.h>
0006 #include <clang/AST/StmtVisitor.h>
0007 #include <clang/AST/ParentMap.h>
0008 #include <clang/Analysis/CFGStmtMap.h>
0009 #include <clang/Analysis/CallGraph.h>
0010 #include <llvm/Support/SaveAndRestore.h>
0011 #include <clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h>
0012 #include <clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h>
0013 #include <clang/StaticAnalyzer/Core/Checker.h>
0014 #include <clang/StaticAnalyzer/Core/BugReporter/BugReporter.h>
0015 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
0016 #include <llvm/ADT/SmallString.h>
0017 
0018 #include "CmsException.h"
0019 #include "CmsSupport.h"
0020 
0021 namespace clangcms {
0022 
0023   class ESRGetChecker : public clang::ento::Checker<clang::ento::check::ASTDecl<clang::CXXMethodDecl>,
0024                                                     clang::ento::check::ASTDecl<clang::FunctionTemplateDecl>,
0025                                                     clang::ento::check::ASTDecl<clang::FunctionDecl> > {
0026   public:
0027     void checkASTDecl(const clang::CXXMethodDecl *CMD,
0028                       clang::ento::AnalysisManager &mgr,
0029                       clang::ento::BugReporter &BR) const;
0030 
0031     void checkASTDecl(const clang::FunctionTemplateDecl *TD,
0032                       clang::ento::AnalysisManager &mgr,
0033                       clang::ento::BugReporter &BR) const;
0034 
0035     void checkASTDecl(const clang::FunctionDecl *CMD,
0036                       clang::ento::AnalysisManager &mgr,
0037                       clang::ento::BugReporter &BR) const;
0038 
0039   private:
0040     CmsException m_exception;
0041   };
0042 
0043 }  // namespace clangcms
0044 #endif