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