mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 23:06:34 +00:00

__interface objects in MSVC are permitted to inherit from __interface types, and interface-like types. Additionally, there are two default interface-like types (IUnknown and IDispatch) that all interface-like types must inherit from. Differential Revision: https://reviews.llvm.org/D37308 llvm-svn: 313364
11 lines
324 B
C++
11 lines
324 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
|
|
|
|
struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown {
|
|
void foo();
|
|
};
|
|
|
|
__interface NoError : public IUnknown {};
|
|
void IUnknown::foo() {}
|
|
// expected-error@+1{{interface type cannot inherit from}}
|
|
__interface HasError : public IUnknown {};
|