blob: 8f741a18eaacd6ca648a12c8ad8f9aa582f3f7b3 [file] [log] [blame]
Erich Keanefcdf09e2017-10-02 16:49:32 +00001// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
2// expected-no-diagnostics
Erich Keane3e08f662017-09-29 21:06:00 +00003typedef long HRESULT;
4typedef unsigned long ULONG;
5typedef struct _GUID {
6 unsigned long Data1;
7 unsigned short Data2;
8 unsigned short Data3;
9 unsigned char Data4[8];
10} GUID;
11typedef GUID IID;
12
13// remove stdcall, since the warnings have nothing to do with
14// what is being tested.
15#define __stdcall
16
17extern "C" {
18extern "C++" {
Erich Keanefcdf09e2017-10-02 16:49:32 +000019struct __declspec(uuid("00000000-0000-0000-C000-000000000046"))
Erich Keane3e08f662017-09-29 21:06:00 +000020 IUnknown {
21public:
22 virtual HRESULT __stdcall QueryInterface(
23 const IID &riid,
24 void **ppvObject) = 0;
25
26 virtual ULONG __stdcall AddRef(void) = 0;
27
28 virtual ULONG __stdcall Release(void) = 0;
29
30 template <class Q>
31 HRESULT __stdcall QueryInterface(Q **pp) {
32 return QueryInterface(__uuidof(Q), (void **)pp);
33 }
34};
35}
36}
37
38__interface ISfFileIOPropertyPage : public IUnknown{};
39