clang
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
u
v
w
Enumerations
_
a
b
c
f
g
i
l
m
n
o
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Examples
lib
StaticAnalyzer
Frontend
CreateCheckerManager.cpp
Go to the documentation of this file.
1
//===- CheckerManager.h - Static Analyzer Checker Manager -------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Defines the Static Analyzer Checker Manager.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
clang/StaticAnalyzer/Core/CheckerManager.h
"
14
#include "
clang/StaticAnalyzer/Frontend/CheckerRegistry.h
"
15
#include <memory>
16
17
namespace
clang
{
18
namespace
ento {
19
20
CheckerManager::CheckerManager
(
21
ASTContext
&Context,
AnalyzerOptions
&AOptions,
const
Preprocessor
&PP,
22
ArrayRef<std::string>
plugins,
23
ArrayRef
<std::function<
void
(
CheckerRegistry
&)>> checkerRegistrationFns)
24
: Context(&Context), LangOpts(Context.getLangOpts()), AOptions(AOptions),
25
PP(&PP), Diags(Context.getDiagnostics()),
26
RegistryData(
std
::make_unique<
CheckerRegistryData
>()) {
27
CheckerRegistry
Registry(*RegistryData, plugins, Context.getDiagnostics(),
28
AOptions, checkerRegistrationFns);
29
Registry.
initializeRegistry
(*
this
);
30
Registry.initializeManager(*
this
);
31
}
32
33
CheckerManager::CheckerManager
(
AnalyzerOptions
&AOptions,
34
const
LangOptions
&LangOpts,
35
DiagnosticsEngine
&Diags,
36
ArrayRef<std::string>
plugins)
37
: LangOpts(LangOpts), AOptions(AOptions), Diags(Diags),
38
RegistryData(
std
::make_unique<
CheckerRegistryData
>()) {
39
CheckerRegistry
Registry(*RegistryData, plugins, Diags, AOptions, {});
40
Registry.
initializeRegistry
(*
this
);
41
}
42
43
CheckerManager::~CheckerManager
() {
44
for
(
const
auto
&
CheckerDtor
: CheckerDtors)
45
CheckerDtor
();
46
}
47
48
}
// namespace ento
49
}
// namespace clang
CheckerManager.h
CheckerRegistry.h
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:188
clang::AnalyzerOptions
Stores options for the analyzer from the command line.
Definition:
AnalyzerOptions.h:179
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition:
Diagnostic.h:231
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition:
LangOptions.h:499
clang::Preprocessor
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Definition:
Preprocessor.h:138
clang::ento::CheckerFn
Definition:
CheckerManager.h:58
clang::ento::CheckerManager::~CheckerManager
~CheckerManager()
Definition:
CreateCheckerManager.cpp:43
clang::ento::CheckerManager::CheckerManager
CheckerManager(ASTContext &Context, AnalyzerOptions &AOptions, const Preprocessor &PP, ArrayRef< std::string > plugins, ArrayRef< std::function< void(CheckerRegistry &)> > checkerRegistrationFns)
Definition:
CreateCheckerManager.cpp:20
clang::ento::CheckerManager::CheckerDtor
CheckerFn< void()> CheckerDtor
Definition:
CheckerManager.h:190
clang::ento::CheckerRegistry
Manages a set of available checkers for running a static analysis.
Definition:
CheckerRegistry.h:89
clang::ento::CheckerRegistry::initializeRegistry
void initializeRegistry(const CheckerManager &Mgr)
Collects all enabled checkers in the field EnabledCheckers.
Definition:
CheckerRegistry.cpp:205
llvm::ArrayRef
Definition:
LLVM.h:31
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
std
Definition:
__clang_cuda_cmath.h:361
clang::ento::CheckerRegistryData
Definition:
CheckerRegistryData.h:193
Generated on Fri Feb 21 2025 14:16:39 for clang by
1.9.6