Files
TheRock/compiler/amd-llvm/clang/test/SemaCXX/borland-extensions.cpp
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

63 lines
1.9 KiB
C++

// 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
// Borland extensions
// 1. test -fborland-extensions
int dummy_function() { return 0; }
// 2. test __pascal
// expected-warning@+1 {{'_pascal' calling convention is not supported for this target}}
int _pascal f2();
// 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; }
struct M {
// expected-warning@+1 {{'__pascal' calling convention is not supported for this target}}
int __pascal addP();
// 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; }
void m2() {
int i; float f;
i = f2();
f = gi2(2, i);
f = g2(gi2);
i = h2<int>(&M::addP);
f = h2(&M::subtractP);
}
// 3. test other calling conventions
int _cdecl fa3();
// expected-warning@+1 {{'_fastcall' calling convention is not supported for this target}}
int _fastcall fc3();
// expected-warning@+1 {{'_stdcall' calling convention is not supported for this target}}
int _stdcall fd3();
// 4. test __uuidof()
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
} GUID;
struct __declspec(uuid("{12345678-1234-1234-1234-123456789abc}")) Foo;
struct Data {
GUID const* Guid;
};
void t4() {
unsigned long data;
const GUID guid_inl = __uuidof(Foo);
Data ata1 = { &guid_inl};
data = ata1.Guid->Data1;
}