summaryrefslogtreecommitdiffstats
path: root/test/CXX/class.derived/class.abstract/p16.cpp
blob: 93f905cd33be8511b71230545ad2c9d72746d009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s

struct A {
  virtual void a(); // expected-note{{overridden virtual function is here}}
  virtual void b() = delete; // expected-note{{overridden virtual function is here}}
};

struct B: A {
  virtual void a() = delete; // expected-error{{deleted function 'a' cannot override a non-deleted function}}
  virtual void b(); // expected-error{{non-deleted function 'b' cannot override a deleted function}}
};

struct C: A {
  virtual void a();
  virtual void b() = delete;
};
OpenPOWER on IntegriCloud