CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions
clangcms::FiniteMathChecker Class Reference

#include <FiniteMathChecker.h>

Inheritance diagram for clangcms::FiniteMathChecker:

Public Member Functions

void checkASTDecl (const clang::CXXRecordDecl *CRD, clang::ento::AnalysisManager &mgr, clang::ento::BugReporter &BR) const
 

Detailed Description

Definition at line 11 of file FiniteMathChecker.h.

Member Function Documentation

◆ checkASTDecl()

void clangcms::FiniteMathChecker::checkASTDecl ( const clang::CXXRecordDecl *  CRD,
clang::ento::AnalysisManager &  mgr,
clang::ento::BugReporter &  BR 
) const

Definition at line 76 of file FiniteMathChecker.cc.

References Exhume::I, and clangcms::support::isCmsLocalFile().

78  {
79  const clang::SourceManager &SM = BR.getSourceManager();
80  const char *sfile = SM.getPresumedLoc(RD->getLocation()).getFilename();
81  if (!support::isCmsLocalFile(sfile))
82  return;
83 
84  for (clang::CXXRecordDecl::method_iterator I = RD->method_begin(), E = RD->method_end(); I != E; ++I) {
85  clang::CXXMethodDecl *MD = llvm::cast<clang::CXXMethodDecl>((*I)->getMostRecentDecl());
86  clang::Stmt *Body = MD->getBody();
87  if (Body) {
88  FMWalkAST walker(this, BR, mgr.getAnalysisDeclContext(MD), MD);
89  walker.Visit(Body);
90  }
91  }
92  }
const std::complex< double > I
Definition: I.h:8
bool isCmsLocalFile(const char *file)