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
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
SemaCXX
/
builtin-ptrtomember-overload.cpp
blob
c27d642f9a46ba5bfe1e207ea2afd145643782ed
1
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2
// expected-no-diagnostics
3
4
struct
A
{};
5
6
struct
B
{
7
operator
A
*();
8
};
9
10
struct
C
:
B
{
11
12
};
13
14
15
void
foo
(
C c
,
B b
,
int
A
::*
pmf
) {
16
int
j
=
c
->*
pmf
;
17
int
i
=
b
->*
pmf
;
18
}
19
20
struct
D
{
21
operator
const
D
*();
22
};
23
24
struct
DPtr
{
25
operator volatile
int
D
::*();
26
};
27
28
int
test
(
D d
,
DPtr dptr
) {
29
return
d
->*
dptr
;
30
}
31