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

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 struct A {
anatofuz
parents:
diff changeset
4 void f();
anatofuz
parents:
diff changeset
5 };
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 struct B : A {};
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 void m() {
anatofuz
parents:
diff changeset
10 const B b;
anatofuz
parents:
diff changeset
11 (b.*&B::f)(); // expected-error{{drops 'const' qualifier}}
anatofuz
parents:
diff changeset
12 ((&b)->*&B::f)(); // expected-error{{drops 'const' qualifier}}
anatofuz
parents:
diff changeset
13 }