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
include
clang
Analysis
SelectorExtras.h
Go to the documentation of this file.
1
//=== SelectorExtras.h - Helpers for checkers using selectors -----*- 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
#ifndef LLVM_CLANG_ANALYSIS_SELECTOREXTRAS_H
10
#define LLVM_CLANG_ANALYSIS_SELECTOREXTRAS_H
11
12
#include "
clang/AST/ASTContext.h
"
13
14
namespace
clang
{
15
16
template
<
typename
... IdentifierInfos>
17
static
inline
Selector
getKeywordSelector
(
ASTContext
&Ctx,
18
const
IdentifierInfos *...IIs) {
19
static_assert
(
sizeof
...(IdentifierInfos) > 0,
20
"keyword selectors must have at least one argument"
);
21
SmallVector<const IdentifierInfo *, 10>
II({&Ctx.
Idents
.
get
(IIs)...});
22
23
return
Ctx.
Selectors
.
getSelector
(II.size(), &II[0]);
24
}
25
26
template
<
typename
... IdentifierInfos>
27
static
inline
void
lazyInitKeywordSelector
(
Selector
&Sel,
ASTContext
&Ctx,
28
IdentifierInfos *... IIs) {
29
if
(!Sel.
isNull
())
30
return
;
31
Sel =
getKeywordSelector
(Ctx, IIs...);
32
}
33
34
}
// end namespace clang
35
36
#endif
ASTContext.h
Defines the clang::ASTContext interface.
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::ASTContext::Idents
IdentifierTable & Idents
Definition:
ASTContext.h:680
clang::ASTContext::Selectors
SelectorTable & Selectors
Definition:
ASTContext.h:681
clang::IdentifierTable::get
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
Definition:
IdentifierTable.h:688
clang::SelectorTable::getSelector
Selector getSelector(unsigned NumArgs, const IdentifierInfo **IIV)
Can create any sort of selector.
Definition:
IdentifierTable.cpp:762
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition:
IdentifierTable.h:966
clang::Selector::isNull
bool isNull() const
Determine whether this is the empty selector.
Definition:
IdentifierTable.h:1051
llvm::SmallVector
Definition:
LLVM.h:35
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
clang::getKeywordSelector
static Selector getKeywordSelector(ASTContext &Ctx, const IdentifierInfos *...IIs)
Definition:
SelectorExtras.h:17
clang::lazyInitKeywordSelector
static void lazyInitKeywordSelector(Selector &Sel, ASTContext &Ctx, IdentifierInfos *... IIs)
Definition:
SelectorExtras.h:27
Generated on Sat Feb 8 2025 07:12:46 for clang by
1.9.6