[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / ms_struct-long-double.c
blob9b3ea7947a03c2c81546cb71fd24c27421624ce8
1 // RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-gnu -fdump-record-layouts %s | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts -Wno-incompatible-ms-struct %s | FileCheck %s
3 // RUN: not %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts %s 2>&1 | FileCheck %s -check-prefix=ERROR
5 struct ldb_struct {
6 char c;
7 long double ldb;
8 } __attribute__((__ms_struct__));
10 struct ldb_struct a;
12 // CHECK: 0 | struct ldb_struct
13 // CHECK-NEXT: 0 | char c
14 // CHECK-NEXT: 4 | long double ldb
15 // CHECK-NEXT: | [sizeof=16, align=4]
17 // ERROR: error: ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren't a power of two