CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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"
14 
15 namespace clangcms {
16 
17 class ConstCastChecker: public clang::ento::Checker< clang::ento::check::PreStmt< clang::CXXConstCastExpr> > {
18 public:
19  mutable std::unique_ptr<clang::ento::BugType> BT;
20  void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const;
21 
22 private:
24 };
25 }
26 
27 #endif
void checkPreStmt(const clang::CXXConstCastExpr *CE, clang::ento::CheckerContext &C) const
std::unique_ptr< clang::ento::BugType > BT