Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:04

0001 //===--- CmsException.h - exceptions for bug reports ------------*- C++ -*-===//
0002 //
0003 // by Thomas Hauth [ Thomas.Hauth@cern.ch ] and Patrick Gartung
0004 //
0005 //===----------------------------------------------------------------------===//
0006 
0007 #ifndef LLVM_CLANG_STATICANALYZER_CMS_CMSEXCEPTION_H
0008 #define LLVM_CLANG_STATICANALYZER_CMS_CMSEXCEPTION_H
0009 
0010 #include <llvm/Support/Regex.h>
0011 #include <llvm/Support/raw_ostream.h>
0012 #include "clang/AST/Type.h"
0013 #include "clang/Basic/SourceManager.h"
0014 #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
0015 #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
0016 
0017 namespace clangcms {
0018 
0019   class CmsException {
0020   public:
0021     bool reportGlobalStaticForType(clang::QualType const& t,
0022                                    clang::ento::PathDiagnosticLocation const& path,
0023                                    clang::ento::BugReporter& BR) const;
0024 
0025     bool reportGlobalStatic(clang::QualType const& t,
0026                             clang::ento::PathDiagnosticLocation const& path,
0027                             clang::ento::BugReporter& BR) const;
0028 
0029     bool reportMutableMember(clang::QualType const& t,
0030                              clang::ento::PathDiagnosticLocation const& path,
0031                              clang::ento::BugReporter& BR) const;
0032     bool reportClass(clang::ento::PathDiagnosticLocation const& path, clang::ento::BugReporter& BR) const;
0033 
0034     bool reportConstCast(const clang::ento::BugReport& R, clang::ento::CheckerContext& C) const;
0035 
0036     bool reportConstCastAway(const clang::ento::BugReport& R, clang::ento::CheckerContext& C) const;
0037 
0038     bool reportGeneral(clang::ento::PathDiagnosticLocation const& path, clang::ento::BugReporter& BR) const;
0039   };
0040 
0041 }  // namespace clangcms
0042 
0043 #endif