repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[SmallPtrSet] Remove SmallArray member (NFC) (#118099)
[llvm-project.git]
/
clang
/
test
/
CodeGenCXX
/
casts.cpp
blob
436b722e69d2714d6dfc672f39986f6b68d6fe44
1
// RUN: %clang_cc1 %s -emit-llvm -o %t
2
3
// PR5248
4
namespace
PR5248
{
5
struct
A
{
6
void
copyFrom
(
const
A
&
src
);
7
void
addRef
(
void
);
8
9
A
&
operator
=(
int
);
10
};
11
12
void
A
::
copyFrom
(
const
A
&
src
) {
13
((
A
&)
src
).
addRef
();
14
}
15
}
16
17
// reinterpret_cast to self
18
void
test
(
PR5248
::
A
*
a
) {
19
reinterpret_cast
<
PR5248
::
A
&>(*
a
) =
17
;
20
}