teak-llvm/clang/test/SemaCXX/PR27037.cpp
Richard Smith 01e4a7f29b 27037: Use correct CVR qualifier on an upcast on method pointer call
Patch by Taiju Tsuiki!

Differential Revision: https://reviews.llvm.org/D33875

llvm-svn: 305126
2017-06-09 22:25:28 +00:00

14 lines
244 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A {
void f();
};
struct B : A {};
void m() {
const B b;
(b.*&B::f)(); // expected-error{{drops 'const' qualifier}}
((&b)->*&B::f)(); // expected-error{{drops 'const' qualifier}}
}