clang-tools
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
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
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
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
f
g
h
i
n
o
p
q
r
s
t
u
Enumerations
b
c
d
e
f
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
h
l
m
n
o
p
q
r
s
t
u
v
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
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
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
Typedefs
a
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
p
q
r
s
u
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
q
r
s
t
u
v
Related Functions
:
c
d
h
i
l
o
p
r
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
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
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
Enumerations
Enumerator
Macros
a
c
d
e
f
h
m
n
o
p
r
s
t
llvm-project
clang-tools-extra
clang-tidy
utils
Aliasing.h
Go to the documentation of this file.
1
//===------------- Aliasing.h - clang-tidy --------------------------------===//
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_TOOLS_EXTRA_CLANG_TIDY_UTILS_ALIASING_H
10
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_ALIASING_H
11
12
#include "clang/AST/Decl.h"
13
14
namespace
clang::tidy::utils
{
15
16
/// Returns whether \p Var has a pointer or reference in \p Func.
17
///
18
/// Example:
19
/// void f() {
20
/// int n;
21
/// ...
22
/// int *p = &n;
23
/// }
24
///
25
/// For `f()` and `n` the function returns ``true`` because `p` is a
26
/// pointer to `n` created in `f()`.
27
28
bool
hasPtrOrReferenceInFunc
(
const
Decl
*Func,
const
VarDecl *Var);
29
30
}
// namespace clang::tidy::utils
31
32
#endif
// LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_ALIASING_H
Decl
const FunctionDecl * Decl
Definition:
AvoidBindCheck.cpp:98
clang::tidy::utils
Definition:
Aliasing.cpp:14
clang::tidy::utils::hasPtrOrReferenceInFunc
bool hasPtrOrReferenceInFunc(const Decl *Func, const VarDecl *Var)
Returns whether Var has a pointer or reference in Func.
Definition:
Aliasing.cpp:92
Generated on Wed Mar 12 2025 09:24:11 for clang-tools by
1.9.6