Anders Carlsson | 1f3b6fd | 2011-01-16 23:56:42 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s |
| 2 | struct S { |
| 3 | virtual void final() final; |
| 4 | virtual void override() override; |
| 5 | virtual void n() new; |
Anders Carlsson | aa031fd | 2011-01-20 03:41:12 +0000 | [diff] [blame] | 6 | int i : 3 new; |
| 7 | int j new; |
| 8 | }; |
| 9 | |
| 10 | struct 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 Carlsson | 1f3b6fd | 2011-01-16 23:56:42 +0000 | [diff] [blame] | 13 | }; |
Anders Carlsson | 37ea6c4 | 2011-01-20 04:07:46 +0000 | [diff] [blame^] | 14 | |
| 15 | struct override; |
| 16 | struct A { |
| 17 | virtual override override(int override) override; |
| 18 | }; |