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_THREAD_SAFE 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
void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const
#define CMS_THREAD_SAFE
std::unique_ptr< clang::ento::BugType > BT