view clang/test/SemaCXX/ms-iunknown-outofline-def.cpp @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
line wrap: on
line source

// 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 {};