#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/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.
|
#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_WEAK_DEPENDENCIES |
|
#define | CHECKER_WEAK_DEPENDENCY(FULLNAME, DEPENDENCY) addWeakDependency(FULLNAME, DEPENDENCY); |
|
#define | GET_CHECKER_OPTIONS |
|
#define | CHECKER_OPTION(TYPE, FULLNAME, CMDFLAG, DESC, DEFAULT_VAL, DEVELOPMENT_STATUS, IS_HIDDEN) |
|
#define | GET_PACKAGE_OPTIONS |
|
#define | PACKAGE_OPTION(TYPE, FULLNAME, CMDFLAG, DESC, DEFAULT_VAL, DEVELOPMENT_STATUS, IS_HIDDEN) |
|
|
static bool | isCompatibleAPIVersion (const char *VersionString) |
|
template<typename IsEnabledFn > |
static bool | collectStrongDependencies (const ConstCheckerInfoList &Deps, const CheckerManager &Mgr, CheckerInfoSet &Ret, IsEnabledFn IsEnabled) |
|
template<typename IsEnabledFn > |
static void | collectWeakDependencies (const ConstCheckerInfoList &Deps, const CheckerManager &Mgr, CheckerInfoSet &Ret, IsEnabledFn IsEnabled) |
| Collects weak dependencies in enabledData.Checkers .
|
|
static void | insertAndValidate (StringRef FullName, const 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.
|
|
template<class T > |
static void | insertOptionToCollection (StringRef FullName, T &Collection, const CmdLineOption &Option, AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) |
|
static void | isOptionContainedIn (const CmdLineOptionList &OptionList, StringRef SuppliedChecker, StringRef SuppliedOption, const AnalyzerOptions &AnOpts, DiagnosticsEngine &Diags) |
|
◆ CHECKER
#define CHECKER |
( |
|
FULLNAME, |
|
|
|
CLASS, |
|
|
|
HELPTEXT, |
|
|
|
DOC_URI, |
|
|
|
IS_HIDDEN |
|
) |
| |
Value: addChecker(register##CLASS, shouldRegister##CLASS, FULLNAME, HELPTEXT, \
DOC_URI, IS_HIDDEN);
◆ CHECKER_DEPENDENCY
#define CHECKER_DEPENDENCY |
( |
|
FULLNAME, |
|
|
|
DEPENDENCY |
|
) |
| addDependency(FULLNAME, DEPENDENCY); |
◆ CHECKER_OPTION
#define CHECKER_OPTION |
( |
|
TYPE, |
|
|
|
FULLNAME, |
|
|
|
CMDFLAG, |
|
|
|
DESC, |
|
|
|
DEFAULT_VAL, |
|
|
|
DEVELOPMENT_STATUS, |
|
|
|
IS_HIDDEN |
|
) |
| |
Value: addCheckerOption(
TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, \
DEVELOPMENT_STATUS, IS_HIDDEN);
#define TYPE(DERIVED, BASE)
◆ CHECKER_WEAK_DEPENDENCY
#define CHECKER_WEAK_DEPENDENCY |
( |
|
FULLNAME, |
|
|
|
DEPENDENCY |
|
) |
| addWeakDependency(FULLNAME, DEPENDENCY); |
◆ GET_CHECKER_DEPENDENCIES
#define GET_CHECKER_DEPENDENCIES |
◆ GET_CHECKER_OPTIONS
#define GET_CHECKER_OPTIONS |
◆ GET_CHECKER_WEAK_DEPENDENCIES
#define GET_CHECKER_WEAK_DEPENDENCIES |
◆ GET_CHECKERS
◆ GET_PACKAGE_OPTIONS
#define GET_PACKAGE_OPTIONS |
◆ GET_PACKAGES
◆ PACKAGE
#define PACKAGE |
( |
|
FULLNAME | ) |
addPackage(FULLNAME); |
◆ PACKAGE_OPTION
#define PACKAGE_OPTION |
( |
|
TYPE, |
|
|
|
FULLNAME, |
|
|
|
CMDFLAG, |
|
|
|
DESC, |
|
|
|
DEFAULT_VAL, |
|
|
|
DEVELOPMENT_STATUS, |
|
|
|
IS_HIDDEN |
|
) |
| |
Value: addPackageOption(
TYPE, FULLNAME, CMDFLAG, DEFAULT_VAL, DESC, \
DEVELOPMENT_STATUS, IS_HIDDEN);
◆ collectStrongDependencies()
template<typename IsEnabledFn >
◆ collectWeakDependencies()
template<typename IsEnabledFn >
◆ insertAndValidate()
◆ insertOptionToCollection()
◆ isCompatibleAPIVersion()
static bool isCompatibleAPIVersion |
( |
const char * |
VersionString | ) |
|
|
static |
◆ isOptionContainedIn()
◆ PackageSeparator
constexpr char PackageSeparator = '.' |
|
staticconstexpr |