1 // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
2 // expected-no-diagnostics
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++" {
19 struct __declspec(uuid("00000000-0000-0000-C000-000000000046"))
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>
QueryInterfaceIUnknown31   HRESULT __stdcall QueryInterface(Q **pp) {
32     return QueryInterface(__uuidof(Q), (void **)pp);
33   }
34 };
35 }
36 }
37 
38 __interface ISfFileIOPropertyPage : public IUnknown{};
39 
40