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 
17 namespace clangcms {
18 
19 class ConstCastChecker: public clang::ento::Checker< clang::ento::check::PreStmt< clang::CXXConstCastExpr> > {
20 public:
21  CMS_THREAD_SAFE mutable std::unique_ptr<clang::ento::BugType> BT;
22  void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const;
23 
24 private:
26 };
27 }
28 
29 #endif
void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const
#define CMS_THREAD_SAFE
std::unique_ptr< clang::ento::BugType > BT