blob: 35f0fe623a6c73f22cad66969675f0e34a3cf866 [file] [log] [blame]
Anders Carlsson1f3b6fd2011-01-16 23:56:42 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2struct S {
3 virtual void final() final;
4 virtual void override() override;
5 virtual void n() new;
Anders Carlssonaa031fd2011-01-20 03:41:12 +00006 int i : 3 new;
7 int j new;
8};
9
10struct T {
11 // virt-specifier-seq is only valid in member-declarators, and a function definition is not a member-declarator.
12 virtual void f() const override { } // expected-error {{expected ';' at end of declaration list}}
Anders Carlsson1f3b6fd2011-01-16 23:56:42 +000013};
Anders Carlsson37ea6c42011-01-20 04:07:46 +000014
15struct override;
16struct A {
17 virtual override override(int override) override;
18};