File indexing completed on 2024-04-06 12:31:49
0001
0002
0003
0004
0005
0006
0007 #include "ConstCastChecker.h"
0008 #include "TrunCastChecker.h"
0009 #include "ConstCastAwayChecker.h"
0010 #include "GlobalStaticChecker.h"
0011 #include "StaticLocalChecker.h"
0012 #include "MutableMemberChecker.h"
0013 #include "ClassChecker.h"
0014 #include "ClassDumper.h"
0015 #include "edmChecker.h"
0016 #include "getByChecker.h"
0017 #include "FiniteMathChecker.h"
0018 #include "CatchAll.h"
0019 #include "UsingNamespace.h"
0020 #include "ArgSizeChecker.h"
0021 #include "FunctionChecker.h"
0022 #include "FunctionDumper.h"
0023 #include "EDMPluginDumper.h"
0024 #include "ThrUnsafeFCallChecker.h"
0025 #include "ESRecordGetChecker.h"
0026 #include "PsetExistsFCallChecker.h"
0027
0028 #include <clang/StaticAnalyzer/Frontend/CheckerRegistry.h>
0029
0030
0031
0032 extern "C" void clang_registerCheckers(clang::ento::CheckerRegistry ®istry) {
0033 registry.addChecker<clangcms::ConstCastAwayChecker>(
0034 "threadsafety.ConstCastAway",
0035 "Checks for casts which remove const qualifier and might result in thread-unsafe code",
0036 "no docs");
0037 registry.addChecker<clangcms::ConstCastChecker>(
0038 "threadsafety.ConstCast",
0039 "Checks for casts which remove const qualifier and might result in thread-unsafe code",
0040 "no docs");
0041 registry.addChecker<clangcms::TrunCastChecker>(
0042 "optional.TruncatingCast",
0043 "Checks for implicit casts where ToType is smaller than FromType which might result in truncation",
0044 "no docs");
0045 registry.addChecker<clangcms::StaticLocalChecker>(
0046 "threadsafety.StaticLocal",
0047 "Checks for non-const method local statics which might not be thread-safe",
0048 "no docs");
0049 registry.addChecker<clangcms::MutableMemberChecker>(
0050 "threadsafety.MutableMember",
0051 "Checks for members with the mutable keyword which might not be thread-safe",
0052 "no docs");
0053 registry.addChecker<clangcms::GlobalStaticChecker>(
0054 "threadsafety.GlobalStatic", "Checks for global non-const statics which might not be thread-safe", "no docs");
0055 registry.addChecker<clangcms::ClassChecker>(
0056 "optional.ClassChecker", "Checks data classes for thread safety issues", "no docs");
0057 registry.addChecker<clangcms::ClassDumperCT>("optional.ClassDumperCT",
0058 "dumps template edm::Wrapper,edm::RunCache,edm::LuminosityBlockCache, "
0059 "and edm::GlobalCache types which define data classes ",
0060 "no docs");
0061 registry.addChecker<clangcms::ClassDumperFT>(
0062 "optional.ClassDumperFT", "dumps macro TYPELOOKUP_DATA_REG types which define data classes", "no docs");
0063 registry.addChecker<clangcms::ClassDumperInherit>(
0064 "optional.ClassDumperInherit", "Dumps classes inheriting from data classes", "no docs");
0065 registry.addChecker<clangcms::ClassDumper>(
0066 "optional.ClassDumper", "Dumps class memmbers and base classes ", "no docs");
0067 registry.addChecker<clangcms::FiniteMathChecker>("cms.NonFiniteMath", "Reports usage of isnan and isinf.", "no docs");
0068 registry.addChecker<clangcms::UsingNamespace>(
0069 "cms.CodeRules.UsingNamespace", "Checks for 'using namespace' or 'using std::' in header files", "no docs");
0070 registry.addChecker<clangcms::CatchAll>(
0071 "cms.CodeRules.CatchAll", "Checks for 'catch(...)' in source files", "no docs");
0072 registry.addChecker<clangcms::edmChecker>(
0073 "deprecated.edmChecker",
0074 "Flags classes inheriting from edm::EDProducer,edm::EDFilter,edm::Analyzer or edm::OutputModule",
0075 "no docs");
0076 registry.addChecker<clangcms::getByChecker>(
0077 "optional.getByChecker",
0078 "Checks for calls to edm::getByLabel or edm::getManyByType and reports edm::Handle type passed",
0079 "no docs");
0080 registry.addChecker<clangcms::PsetExistsFCallChecker>(
0081 "cms.CodeRules.psetExistsChecker",
0082 "Checks for calls to edm::ParameterSet::exists() or edm::ParameterSet::existsAs<>()",
0083 "no docs");
0084 registry.addChecker<clangcms::ArgSizeChecker>(
0085 "optional.ArgSize", "Reports args passed by value with size>4k.", "no docs");
0086 registry.addChecker<clangcms::FunctionChecker>(
0087 "cms.FunctionChecker", "Reports functions which access non-const statics", "no docs");
0088 registry.addChecker<clangcms::FunctionDumper>(
0089 "cms.FunctionDumper", "Reports function calls and overrides", "no docs");
0090 registry.addChecker<clangcms::EDMPluginDumper>(
0091 "optional.EDMPluginDumper", "Dumps macro DEFINE_EDM_PLUGIN types", "no docs");
0092 registry.addChecker<clangcms::ThrUnsafeFCallChecker>(
0093 "threadsafety.ThrUnsafeFCallChecker", "Reports calls of known thread unsafe functions", "no docs");
0094 }
0095
0096 extern "C" const char clang_analyzerAPIVersionString[] = CLANG_ANALYZER_API_VERSION_STRING;