2013-01-29 09:24:26 +08:00
|
|
|
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
|
2013-01-25 00:46:58 +08:00
|
|
|
|
2013-02-01 09:19:17 +08:00
|
|
|
// CHECK: int x __attribute__((aligned(4)));
|
2013-01-25 00:46:58 +08:00
|
|
|
int x __attribute__((aligned(4)));
|
|
|
|
|
2013-01-29 09:24:26 +08:00
|
|
|
// FIXME: Print this at a valid location for a __declspec attr.
|
2013-02-01 09:19:17 +08:00
|
|
|
// CHECK: int y __declspec(align(4));
|
2013-01-29 09:24:26 +08:00
|
|
|
__declspec(align(4)) int y;
|
2013-01-25 00:46:58 +08:00
|
|
|
|
2018-02-28 07:49:28 +08:00
|
|
|
// CHECK: short arr[3] __attribute__((aligned));
|
|
|
|
short arr[3] __attribute__((aligned));
|
|
|
|
|
2013-01-25 00:46:58 +08:00
|
|
|
// CHECK: void foo() __attribute__((const));
|
|
|
|
void foo() __attribute__((const));
|
|
|
|
|
|
|
|
// CHECK: void bar() __attribute__((__const));
|
|
|
|
void bar() __attribute__((__const));
|
2013-01-29 10:31:57 +08:00
|
|
|
|
2013-05-23 07:25:32 +08:00
|
|
|
// CHECK: int * __ptr32 p32;
|
2013-01-29 10:31:57 +08:00
|
|
|
int * __ptr32 p32;
|
|
|
|
|
2013-05-23 07:25:32 +08:00
|
|
|
// CHECK: int * __ptr64 p64;
|
2013-01-29 10:31:57 +08:00
|
|
|
int * __ptr64 p64;
|
2013-05-23 07:25:32 +08:00
|
|
|
|
2018-08-03 09:21:16 +08:00
|
|
|
// CHECK: int * __uptr __ptr32 p32_2;
|
2013-05-23 07:25:32 +08:00
|
|
|
int * __uptr __ptr32 p32_2;
|
|
|
|
|
2018-08-03 09:21:16 +08:00
|
|
|
// CHECK: int * __sptr __ptr64 p64_2;
|
2013-05-23 07:25:32 +08:00
|
|
|
int * __sptr __ptr64 p64_2;
|
|
|
|
|
2018-08-03 09:21:16 +08:00
|
|
|
// CHECK: int * __uptr __ptr32 p32_3;
|
2013-05-23 07:25:32 +08:00
|
|
|
int * __uptr __ptr32 p32_3;
|
|
|
|
|
|
|
|
// CHECK: int * __sptr * __ptr32 ppsp32;
|
|
|
|
int * __sptr * __ptr32 ppsp32;
|
2016-03-11 07:54:12 +08:00
|
|
|
|
2016-06-29 04:55:30 +08:00
|
|
|
// CHECK: __attribute__((availability(macos, strict, introduced=10.6)));
|
2016-03-11 07:54:12 +08:00
|
|
|
void f6(int) __attribute__((availability(macosx,strict,introduced=10.6)));
|