clang
10.0.0svn
|
#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LLVM.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include "clang/StaticAnalyzer/Checkers/Checkers.inc"
Go to the source code of this file.
Macros | |
#define | GET_CHECKERS |
#define | CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) |
#define | GET_PACKAGES |
#define | PACKAGE(FULLNAME) addPackage(FULLNAME); |
#define | GET_CHECKER_DEPENDENCIES |
#define | CHECKER_DEPENDENCY(FULLNAME, DEPENDENCY) addDependency(FULLNAME, DEPENDENCY); |
#define | GET_CHECKER_OPTIONS |
#define | CHECKER_OPTION(TYPE, FULLNAME, CMDFLAG, DESC, DEFAULT_VAL, DEVELOPMENT_STATUS, IS_HIDDEN) addCheckerOption(TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, DEVELOPMENT_STATUS, IS_HIDDEN); |
#define | GET_PACKAGE_OPTIONS |
#define | PACKAGE_OPTION(TYPE, FULLNAME, CMDFLAG, DESC, DEFAULT_VAL, DEVELOPMENT_STATUS, IS_HIDDEN) addPackageOption(TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, DEVELOPMENT_STATUS, IS_HIDDEN); |
Typedefs | |
using | RegisterCheckersFn = void(*)(CheckerRegistry &) |
Functions | |
static bool | isCompatibleAPIVersion (const char *VersionString) |
template<class CheckerOrPackageInfoList > | |
static std::conditional< std::is_const< CheckerOrPackageInfoList >::value, typename CheckerOrPackageInfoList::const_iterator, typename CheckerOrPackageInfoList::iterator >::type | binaryFind (CheckerOrPackageInfoList &Collection, StringRef FullName) |
static bool | isInPackage (const CheckerRegistry::CheckerInfo &Checker, StringRef PackageName) |
static bool | collectDependenciesImpl (const CheckerRegistry::ConstCheckerInfoList &Deps, const LangOptions &LO, CheckerRegistry::CheckerInfoSet &Ret) |
Collects dependencies in ret , returns false on failure. More... | |
static LLVM_NODISCARD llvm::Optional< CheckerRegistry::CheckerInfoSet > | collectDependencies (const CheckerRegistry::CheckerInfo &checker, const LangOptions &LO) |
Collects dependenies in enabledCheckers . Return None on failure. More... | |
static void | insertAndValidate (StringRef FullName, const CheckerRegistry::CmdLineOption &Option, AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) |
Insert the checker/package option to AnalyzerOptions' config table, and validate it, if the user supplied it on the command line. More... | |
template<class T > | |
static void | insertOptionToCollection (StringRef FullName, T &Collection, const CheckerRegistry::CmdLineOption &Option, AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) |
static void | isOptionContainedIn (const CheckerRegistry::CmdLineOptionList &OptionList, StringRef SuppliedChecker, StringRef SuppliedOption, const AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) |
Variables | |
static constexpr char | PackageSeparator = '.' |
#define CHECKER | ( | FULLNAME, | |
CLASS, | |||
HELPTEXT, | |||
DOC_URI, | |||
IS_HIDDEN | |||
) |
#define CHECKER_DEPENDENCY | ( | FULLNAME, | |
DEPENDENCY | |||
) | addDependency(FULLNAME, DEPENDENCY); |
#define CHECKER_OPTION | ( | TYPE, | |
FULLNAME, | |||
CMDFLAG, | |||
DESC, | |||
DEFAULT_VAL, | |||
DEVELOPMENT_STATUS, | |||
IS_HIDDEN | |||
) | addCheckerOption(TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, DEVELOPMENT_STATUS, IS_HIDDEN); |
#define GET_CHECKER_DEPENDENCIES |
#define GET_CHECKER_OPTIONS |
#define GET_CHECKERS |
#define GET_PACKAGE_OPTIONS |
#define GET_PACKAGES |
#define PACKAGE | ( | FULLNAME | ) | addPackage(FULLNAME); |
#define PACKAGE_OPTION | ( | TYPE, | |
FULLNAME, | |||
CMDFLAG, | |||
DESC, | |||
DEFAULT_VAL, | |||
DEVELOPMENT_STATUS, | |||
IS_HIDDEN | |||
) | addPackageOption(TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, DEVELOPMENT_STATUS, IS_HIDDEN); |
using RegisterCheckersFn = void (*)(CheckerRegistry &) |
Definition at line 30 of file CheckerRegistry.cpp.
|
static |
Definition at line 58 of file CheckerRegistry.cpp.
Referenced by collectDependenciesImpl(), insertOptionToCollection(), and isInPackage().
|
static |
Collects dependenies in enabledCheckers
. Return None on failure.
Definition at line 228 of file CheckerRegistry.cpp.
References collectDependenciesImpl(), and Ret().
Referenced by collectDependenciesImpl().
|
static |
Collects dependencies in ret
, returns false on failure.
Definition at line 241 of file CheckerRegistry.cpp.
References binaryFind(), and collectDependencies().
Referenced by clang::ento::CheckerRegistry::CheckerRegistry(), and collectDependencies().
|
static |
Insert the checker/package option to AnalyzerOptions' config table, and validate it, if the user supplied it on the command line.
Definition at line 312 of file CheckerRegistry.cpp.
References clang::AnalyzerOptions::Config, clang::DiagnosticsEngine::Report(), and clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue.
Referenced by insertOptionToCollection().
|
static |
Definition at line 362 of file CheckerRegistry.cpp.
References binaryFind(), and insertAndValidate().
|
static |
Definition at line 32 of file CheckerRegistry.cpp.
References CLANG_ANALYZER_API_VERSION_STRING.
Referenced by clang::ento::CheckerRegistry::CheckerRegistry().
|
static |
Definition at line 74 of file CheckerRegistry.cpp.
References binaryFind(), and PackageSeparator.
|
static |
Definition at line 446 of file CheckerRegistry.cpp.
References clang::DiagnosticsEngine::Report(), and clang::AnalyzerOptions::ShouldEmitErrorsOnInvalidConfigValue.
Referenced by clang::ento::CheckerRegistry::validateCheckerOptions().
|
static |
Definition at line 72 of file CheckerRegistry.cpp.
Referenced by isInPackage().