32 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++112// expected-no-diagnostics3 4struct A {};5 6struct B {7 operator A*();8};9 10struct C : B {11 12};13 14 15void foo(C c, B b, int A::* pmf) {16 int j = c->*pmf; 17 int i = b->*pmf;18}19 20struct D {21 operator const D *();22};23 24struct DPtr {25 operator volatile int D::*();26};27 28int test(D d, DPtr dptr) {29 return d->*dptr;30}31 32