Erich Keane | fcdf09e | 2017-10-02 16:49:32 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s |
| 2 | // expected-no-diagnostics |
Erich Keane | 3e08f66 | 2017-09-29 21:06:00 +0000 | [diff] [blame] | 3 | typedef long HRESULT; |
| 4 | typedef unsigned long ULONG; |
| 5 | typedef struct _GUID { |
| 6 | unsigned long Data1; |
| 7 | unsigned short Data2; |
| 8 | unsigned short Data3; |
| 9 | unsigned char Data4[8]; |
| 10 | } GUID; |
| 11 | typedef GUID IID; |
| 12 | |
| 13 | // remove stdcall, since the warnings have nothing to do with |
| 14 | // what is being tested. |
| 15 | #define __stdcall |
| 16 | |
| 17 | extern "C" { |
| 18 | extern "C++" { |
Erich Keane | fcdf09e | 2017-10-02 16:49:32 +0000 | [diff] [blame] | 19 | struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) |
Erich Keane | 3e08f66 | 2017-09-29 21:06:00 +0000 | [diff] [blame] | 20 | IUnknown { |
| 21 | public: |
| 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 | |