[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / builtin-ptrtomember-overload.cpp
blobc27d642f9a46ba5bfe1e207ea2afd145643782ed
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2 // expected-no-diagnostics
4 struct A {};
6 struct B {
7 operator A*();
8 };
10 struct C : B {
15 void foo(C c, B b, int A::* pmf) {
16 int j = c->*pmf;
17 int i = b->*pmf;
20 struct D {
21 operator const D *();
24 struct DPtr {
25 operator volatile int D::*();
28 int test(D d, DPtr dptr) {
29 return d->*dptr;