forked from OSchip/llvm-project
parent
dd36defda7
commit
fa9de26518
|
@ -0,0 +1,15 @@
|
|||
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
|
||||
|
||||
struct B1 {
|
||||
[[final]] virtual void f(); // expected-note {{overridden virtual function is here}}
|
||||
};
|
||||
|
||||
struct D1 : B1 {
|
||||
void f(); // expected-error {{declaration of 'f' overrides a 'final' function}}
|
||||
};
|
||||
|
||||
struct [[final]] B2 { // expected-note {{'B2' declared here}}
|
||||
};
|
||||
|
||||
struct D2 : B2 { // expected-error {{derivation from 'final' struct B2}}
|
||||
};
|
Loading…
Reference in New Issue