llvm-for-llvmta/tools/clang/test/SemaCXX/ms-iunknown-outofline-def.cpp

11 lines
324 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// 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 {};