1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
8 virtual void g() override override
; // expected-error {{class member already marked 'override'}}
9 virtual void h() final final
; // expected-error {{class member already marked 'final'}}
13 virtual void e1(), e2();
18 virtual void e1() override
, e2(int); // No error.
19 virtual void f() override
;
20 void g() override
; // expected-error {{only virtual member functions can be marked 'override'}}
21 int h override
; // expected-error {{only virtual member functions can be marked 'override'}}
25 virtual void f() final
;
26 void g() final
; // expected-error {{only virtual member functions can be marked 'final'}}
27 int h final
; // expected-error {{only virtual member functions can be marked 'final'}}
30 namespace inline_extension
{
36 virtual void g() override override
{} // expected-error {{class member already marked 'override'}}
37 virtual void h() final final
{} // expected-error {{class member already marked 'final'}}
45 virtual void f() override
{}
46 void g() override
{} // expected-error {{only virtual member functions can be marked 'override'}}
50 virtual void f() final
{}
51 void g() final
{} // expected-error {{only virtual member functions can be marked 'final'}}