view clang/test/SemaCXX/PR27037.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
line wrap: on
line source

// 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}}
}