brintos

brintos / llvm-project-archived public Read only

0
0
Text · 244 B · 422de0e Raw
14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3struct A {4  void f();5};6 7struct B : A {};8 9void m() {10  const B b;11  (b.*&B::f)();  // expected-error{{drops 'const' qualifier}}12  ((&b)->*&B::f)();  // expected-error{{drops 'const' qualifier}}13}14