1 // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
3 extern "C++" struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown
{
5 // Definitions aren't allowed, unless they are a template.
10 struct IPropertyPageBase
: public IUnknown
{};
11 struct IPropertyPage
: public IPropertyPageBase
{};
12 __interface ISfFileIOPropertyPage
: public IPropertyPage
{};
16 struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown
{};
17 // expected-error@+1 {{interface type cannot inherit from}}
18 __interface IPropertyPageBase
: public IUnknown
{};
22 extern "C++" struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown
{};
23 // expected-error@+1 {{interface type cannot inherit from}}
24 __interface IPropertyPageBase
: public IUnknown
{};
27 // expected-error@+1 {{interface type cannot inherit from}}
28 __interface IPropertyPageBase2
: public NS::IUnknown
{};
30 __interface temp_iface
{};
31 struct bad_base
: temp_iface
{};
32 // expected-error@+1 {{interface type cannot inherit from}}
33 __interface bad_inherit
: public bad_base
{};
35 struct mult_inher_base
: temp_iface
, IUnknown
{};
36 // expected-error@+1 {{interface type cannot inherit from}}
37 __interface bad_inherit2
: public mult_inher_base
{};
39 struct PageBase
: public IUnknown
{};
40 struct Page3
: public PageBase
{};
41 struct Page4
: public PageBase
{};
42 __interface PropertyPage
: public Page4
{};
44 struct Page5
: public Page3
, Page4
{};
45 // expected-error@+1 {{interface type cannot inherit from}}
46 __interface PropertyPage2
: public Page5
{};
49 __interface PP
: IUnknown
, IF1
{};
50 __interface PP2
: PP
, Page3
, Page4
{};