| // RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple x86_64-linux-gnu -verify |
| // RUN: %clang_cc1 %s -fsyntax-only -fborland-extensions -triple i686-linux-gnu -Werror |
| // 1. test -fborland-extensions |
| int dummy_function() { return 0; } |
| // expected-warning@+1 {{'_pascal' calling convention is not supported for this target}} |
| // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}} |
| float __pascal gi2(int, int); |
| // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}} |
| template<typename T> T g2(T (__pascal * const )(int, int)) { return 0; } |
| // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}} |
| // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}} |
| float __pascal subtractP(); |
| // expected-warning@+1 {{'__pascal' calling convention is not supported for this target}} |
| template<typename T> int h2(T (__pascal M::* const )()) { return 0; } |
| // 3. test other calling conventions |
| // expected-warning@+1 {{'_fastcall' calling convention is not supported for this target}} |
| // expected-warning@+1 {{'_stdcall' calling convention is not supported for this target}} |
| unsigned char Data4[ 8 ]; |
| struct __declspec(uuid("{12345678-1234-1234-1234-123456789abc}")) Foo; |
| const GUID guid_inl = __uuidof(Foo); |
| Data ata1 = { &guid_inl}; |