1 // RUN: %clang_cc1 %s -fsyntax-only -verify -std=c++11
4 // : base-specifier-list
5 // base-specifier-list:
6 // base-specifier ...[opt]
7 // base-specifier-list , base-specifier ...[opt]
9 // attribute-specifier-seq[opt] base-type-specifier
10 // attribute-specifier-seq[opt] virtual access-specifier[opt] base-type-specifier
11 // attribute-specifier-seq[opt] access-specifier virtual[opt] base-type-specifier
13 // nested-name-specifier[opt] class-name
15 // base-type-specifier:
24 struct Derived
: decltype(Base()) { };
27 struct Derived2
: decltype(func()) { }; // expected-error {{base specifier must name a class}}
30 struct Derived3
: decltype(T().foo()) { };
31 struct Foo
{ Base
foo(); };
34 struct Derived4
: :: decltype(Base()) { }; // expected-error {{unexpected namespace scope prior to decltype}}
36 struct Derived5
: PR11216:: decltype(Base()) { }; // expected-error {{unexpected namespace scope prior to decltype}}
39 struct Derived6
: typename
T::foo
{ }; // expected-error {{'typename' is redundant; base classes are implicitly types}}