CMS 3D CMS Logo

ConstCastChecker.h
Go to the documentation of this file.
1 //== ConstCastChecker.h - Checks for const_cast<> --------------*- C++ -*--==//
2 //
3 // by Thomas Hauth [ Thomas.Hauth@cern.ch ]
4 //
5 //===----------------------------------------------------------------------===//
6 
7 #ifndef Utilities_StaticAnalyzers_ConstCastChecker_h
8 #define Utilities_StaticAnalyzers_ConstCastChecker_h
9 
10 #include <clang/StaticAnalyzer/Core/Checker.h>
11 #include <clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h>
12 #include <clang/StaticAnalyzer/Core/BugReporter/BugType.h>
13 #include "CmsException.h"
15 
16 namespace clangcms {
17 
18  class ConstCastChecker : public clang::ento::Checker<clang::ento::check::PreStmt<clang::CXXConstCastExpr> > {
19  public:
20  CMS_SA_ALLOW mutable std::unique_ptr<clang::ento::BugType> BT;
21  void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const;
22 
23  private:
25  };
26 } // namespace clangcms
27 
28 #endif
clangcms::CmsException
Definition: CmsException.h:19
clangcms
Definition: ArgSizeChecker.h:10
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
clangcms::ConstCastChecker::BT
std::unique_ptr< clang::ento::BugType > BT
Definition: ConstCastChecker.h:20
clangcms::ConstCastChecker::checkPreStmt
void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const
thread_safety_macros.h
CmsException.h
gen::C
C
Definition: PomwigHadronizer.cc:76
clangcms::ConstCastChecker::m_exception
CmsException m_exception
Definition: ConstCastChecker.h:24
clangcms::ConstCastChecker
Definition: ConstCastChecker.h:18