blob: be79db36e0df49f24054c61c102061cccebe4855 [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Anders Carlssonc7119a82011-01-20 05:55:43 +00003
4struct Base {
5 virtual void override();
6};
7
8struct S : Base {
Anders Carlsson1f3b6fd2011-01-16 23:56:42 +00009 virtual void final() final;
10 virtual void override() override;
Anders Carlssonaa031fd2011-01-20 03:41:12 +000011};
12
13struct T {
14 // virt-specifier-seq is only valid in member-declarators, and a function definition is not a member-declarator.
Anders Carlssonc7119a82011-01-20 05:55:43 +000015 // FIXME: This currently doesn't work.
16 // virtual void f() const override { }
Anders Carlsson1f3b6fd2011-01-16 23:56:42 +000017};
Anders Carlsson37ea6c42011-01-20 04:07:46 +000018
19struct override;
Anders Carlssonc7119a82011-01-20 05:55:43 +000020struct Base2 {
21 virtual override override(int override);
22};
23
24struct A : Base2 {
25 virtual struct override override(int override) override;
Anders Carlsson37ea6c42011-01-20 04:07:46 +000026};