1 #ifndef Utilities_StaticAnalyzers_MemberDumper_h
2 #define Utilities_StaticAnalyzers_MemberDumper_h
3 #include <clang/AST/DeclCXX.h>
4 #include <clang/AST/Decl.h>
5 #include <clang/AST/DeclTemplate.h>
6 #include <clang/AST/StmtVisitor.h>
7 #include <clang/AST/ParentMap.h>
8 #include <clang/Analysis/CFGStmtMap.h>
9 #include <llvm/Support/SaveAndRestore.h>
10 #include <clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h>
11 #include <clang/StaticAnalyzer/Core/Checker.h>
12 #include <clang/StaticAnalyzer/Core/BugReporter/BugReporter.h>
13 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
14 #include <llvm/ADT/SmallString.h>
21 class ClassDumper :
public clang::ento::Checker<clang::ento::check::ASTDecl<clang::CXXRecordDecl> > {
22 mutable clang::OwningPtr< clang::ento::BugType>
BT;
25 void checkASTDecl(
const clang::CXXRecordDecl *CRD, clang::ento::AnalysisManager& mgr,
28 void checkASTDecl(
const clang::CXXRecordDecl *RD,clang::ento::AnalysisManager& mgr,
29 clang::ento::BugReporter &BR)
const {
30 std::string pname =
"/tmp/classes.txt.dumperall.unsorted";
39 class ClassDumperCT :
public clang::ento::Checker<clang::ento::check::ASTDecl<clang::ClassTemplateDecl> > {
40 mutable clang::OwningPtr< clang::ento::BugType>
BT;
44 void checkASTDecl(
const clang::ClassTemplateDecl *TD, clang::ento::AnalysisManager& mgr,
45 clang::ento::BugReporter &BR )
const ;
52 class ClassDumperFT :
public clang::ento::Checker<clang::ento::check::ASTDecl<clang::FunctionTemplateDecl> > {
53 mutable clang::OwningPtr< clang::ento::BugType>
BT;
57 void checkASTDecl(
const clang::FunctionTemplateDecl *TD, clang::ento::AnalysisManager& mgr,
58 clang::ento::BugReporter &BR )
const ;
65 class ClassDumperInherit :
public clang::ento::Checker<clang::ento::check::ASTDecl<clang::CXXRecordDecl> > {
66 mutable clang::OwningPtr< clang::ento::BugType>
BT;
69 void checkASTDecl(
const clang::CXXRecordDecl *CRD, clang::ento::AnalysisManager& mgr,
70 clang::ento::BugReporter &BR )
const ;
void checkASTDecl(const clang::FunctionTemplateDecl *TD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR) const
clang::OwningPtr< clang::ento::BugType > BT
static char const * tname
void checkASTDecl(const clang::CXXRecordDecl *CRD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR, std::string tname) const
clang::OwningPtr< clang::ento::BugType > BT
void checkASTDecl(const clang::ClassTemplateDecl *TD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR) const
void checkASTDecl(const clang::CXXRecordDecl *RD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR) const
clang::OwningPtr< clang::ento::BugType > BT
void checkASTDecl(const clang::CXXRecordDecl *CRD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR) const
clang::OwningPtr< clang::ento::BugType > BT