summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ms-iunknown-outofline-def.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/ms-iunknown-outofline-def.cpp')
-rw-r--r--clang/test/SemaCXX/ms-iunknown-outofline-def.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/ms-iunknown-outofline-def.cpp b/clang/test/SemaCXX/ms-iunknown-outofline-def.cpp
new file mode 100644
index 00000000000..b6e74d0eb60
--- /dev/null
+++ b/clang/test/SemaCXX/ms-iunknown-outofline-def.cpp
@@ -0,0 +1,10 @@
+// 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 {};
OpenPOWER on IntegriCloud