clang  9.0.0svn
Macros | Typedefs | Functions | Variables
CheckerRegistry.cpp File Reference
#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LLVM.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.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"
Include dependency graph for CheckerRegistry.cpp:

Go to the source code of this file.

Macros

#define GET_CHECKERS
 
#define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI)
 
#define GET_CHECKER_DEPENDENCIES
 
#define CHECKER_DEPENDENCY(FULLNAME, DEPENDENCY)   addDependency(FULLNAME, DEPENDENCY);
 

Typedefs

using RegisterCheckersFn = void(*)(CheckerRegistry &)
 

Functions

static bool isCompatibleAPIVersion (const char *versionString)
 
static bool checkerNameLT (const CheckerRegistry::CheckerInfo &a, const CheckerRegistry::CheckerInfo &b)
 
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...
 

Variables

static constexpr char PackageSeparator = '.'
 

Macro Definition Documentation

◆ CHECKER

#define CHECKER (   FULLNAME,
  CLASS,
  HELPTEXT,
  DOC_URI 
)
Value:
addChecker(register##CLASS, shouldRegister##CLASS, FULLNAME, HELPTEXT, \
DOC_URI);

◆ CHECKER_DEPENDENCY

#define CHECKER_DEPENDENCY (   FULLNAME,
  DEPENDENCY 
)    addDependency(FULLNAME, DEPENDENCY);

◆ GET_CHECKER_DEPENDENCIES

#define GET_CHECKER_DEPENDENCIES

◆ GET_CHECKERS

#define GET_CHECKERS

Typedef Documentation

◆ RegisterCheckersFn

using RegisterCheckersFn = void (*)(CheckerRegistry &)

Definition at line 29 of file CheckerRegistry.cpp.

Function Documentation

◆ checkerNameLT()

static bool checkerNameLT ( const CheckerRegistry::CheckerInfo &  a,
const CheckerRegistry::CheckerInfo &  b 
)
static

◆ collectDependencies()

static LLVM_NODISCARD llvm::Optional<CheckerRegistry::CheckerInfoSet> collectDependencies ( const CheckerRegistry::CheckerInfo &  checker,
const LangOptions LO 
)
static

Collects dependenies in enabledCheckers. Return None on failure.

Definition at line 189 of file CheckerRegistry.cpp.

References collectDependenciesImpl().

Referenced by collectDependenciesImpl().

◆ collectDependenciesImpl()

static bool collectDependenciesImpl ( const CheckerRegistry::ConstCheckerInfoList &  deps,
const LangOptions LO,
CheckerRegistry::CheckerInfoSet &  ret 
)
static

Collects dependencies in ret, returns false on failure.

Definition at line 201 of file CheckerRegistry.cpp.

References clang::ento::CheckerRegistry::addChecker(), and collectDependencies().

Referenced by clang::ento::CheckerRegistry::CheckerRegistry(), and collectDependencies().

◆ isCompatibleAPIVersion()

static bool isCompatibleAPIVersion ( const char *  versionString)
static

◆ isInPackage()

static bool isInPackage ( const CheckerRegistry::CheckerInfo &  checker,
StringRef  packageName 
)
static

Definition at line 48 of file CheckerRegistry.cpp.

References checkerNameLT(), and PackageSeparator.

Variable Documentation

◆ PackageSeparator

constexpr char PackageSeparator = '.'
static

Definition at line 46 of file CheckerRegistry.cpp.

Referenced by isInPackage().