1 // RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple x86_64-linux-gnu -verify
2 // RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple i686-linux-gnu -Werror
6 // 1. test -fborland-extensions
7 int dummy_function() { return 0; }
10 // expected-warning@+1 {{'_pascal' calling convention is not supported for this target}}
13 // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
14 float __pascal
gi2(int, int);
15 // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
16 template<typename T
> T
g2(T (__pascal
* const )(int, int)) { return 0; }
19 // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
21 // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
22 float __pascal
subtractP();
24 // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
25 template<typename T
> int h2(T (__pascal
M::* const )()) { return 0; }
31 i
= h2
<int>(&M::addP
);
32 f
= h2(&M::subtractP
);
35 // 3. test other calling conventions
37 // expected-warning@+1 {{'_fastcall' calling convention is not supported for this target}}
39 // expected-warning@+1 {{'_stdcall' calling convention is not supported for this target}}
43 typedef struct _GUID
{
47 unsigned char Data4
[ 8 ];
50 struct __declspec(uuid("{12345678-1234-1234-1234-123456789abc}")) Foo
;
58 const GUID guid_inl
= __uuidof(Foo
);
59 Data ata1
= { &guid_inl
};
60 data
= ata1
.Guid
->Data1
;